Path: utzoo!mnetor!uunet!husc6!cmcl2!brl-adm!adm!gpandelios@gtewis.arpa From: gpandelios@gtewis.arpa Newsgroups: comp.lang.pascal Subject: Variable declarations & initializations Message-ID: <13440@brl-adm.ARPA> Date: 5 May 88 20:31:52 GMT Sender: news@brl-adm.ARPA Lines: 43 Greetings, Fellow BBoarders: I am posting this for a co-worker, although I am curious about it as well. It seems like a very simple question, something that should be resolved by the documenation, but I can't find anything about it anywhere. ----------------------------Question Follows:----------------------- Using Micropower Pascal, what is the correct syntax for declaring a variable and initializing it in the same statement? Can this be done? The documenation doesn't seem to mention this. Maybe it is only valid in certain dialects. The following are examples of the idea in other languages. What is the Pascal syntax for this? Fortran: INTEGER I /5/ !Long time since I wrote this stuff Modula-2: VAR i : INTEGER := 56; (* Looks right *) Ada: Max_Employees : integer range 0..20 := 0; -------------------------------------------------------------------- Thanks in advance for your help. You may reply either to the net or to me personally. George =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= ARPAnet: GPANDELIOS@GTEWIS.ARPA US Mail: George J. Pandelios GTE Government Systems Telephone: (301) 738-8924 1700 Research Blvd Rockville, MD 20850 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 1st Law of Programming: Thou shalt not change working code! Standard Disclaimer: This opinion does not necessarily represent the viewpoint of GTE Government Systems, its employees, or its affiliated organizations.