[comp.sys.mac.programmer] LSP V2.0 "univ" meaning?

siegel@endor.harvard.edu (Rich Siegel) (05/07/89)

In article <568339@vaxa.uwa.oz> a_dent@vaxa.uwa.oz (Andy Dent, ph: 09 380 2620) writes:
>whilst browsing through the V2.0 manual for Lightspeed Pascal, I noticed a
>reserved word "univ" which fails to appear elsewhere.  I can't find any 
>reference to "univ" in the "Object Pascal Report" so I assume it isn't part
>of the Object Pascal extensions.

	I feel a really strong sense of "deja post" coming on... :-)

	UNIV is a MPW Pascal extension that disables type checking on actual
parameters passed for UNIV formal parameters, as long as the actual parameter
being passed is of the same size as the UNIV formal parameter. For example,
you could declare to Toolbox "DisposHandle" call as:

	procedure DisposHandle (h : UNIV Handle);
	External;

Meaning that Pascal would allow you to pass ANY four-byte data type to
DisposHandle without having to cast it.

>BTW - I'm not impressed by their failure to include ANY Object Pascal info - 
	
	Object Pascal didn't make it into the doc because of time consider-
ations; it'll be in a future release of the manual.

		--Rich



~~~~~~~~~~~~~~~
 Rich Siegel
 Staff Software Developer
 Symantec Corporation, Language Products Group
 Internet: siegel@endor.harvard.edu
 UUCP: ..harvard!endor!siegel

 "She told me to make myself comfortable, so I pulled down my pants
 and sat in the pudding." -Emo Phillips
~~~~~~~~~~~~~~~

a_dent@vaxa.uwa.oz (Andy Dent, ph: 09 380 2620) (05/07/89)

whilst browsing through the V2.0 manual for Lightspeed Pascal, I noticed a
reserved word "univ" which fails to appear elsewhere.  I can't find any 
reference to "univ" in the "Object Pascal Report" so I assume it isn't part
of the Object Pascal extensions.

Can anyone shed light on the use of "univ"?

BTW - I'm not impressed by their failure to include ANY Object Pascal info - 
they could at least have had an appendix containing the Object Pascal Report
(assuming Apple willing).

drc@claris.com (Dennis Cohen) (05/07/89)

In article <568339@vaxa.uwa.oz> a_dent@vaxa.uwa.oz (Andy Dent, ph: 09 380 2620) writes:
>whilst browsing through the V2.0 manual for Lightspeed Pascal, I noticed a
>reserved word "univ" which fails to appear elsewhere.  I can't find any 
>reference to "univ" in the "Object Pascal Report" so I assume it isn't part
>of the Object Pascal extensions.
>
"univ" was an extension which I first saw in an Apple compiler back in the
days when Apple ///s and Lisas were considered their "business" systems.
univ parameters tell the compiler to suspend type-checking and let any type of
the same size be used for this argument.  For example, if HLock had been
specified as HLock(univ h: Handle); then you could pass ControlHandles,
TEHandles, etc without type-casting and the Pascal compiler wouldn't complain.

>Can anyone shed light on the use of "univ"?
>
>BTW - I'm not impressed by their failure to include ANY Object Pascal info - 
>they could at least have had an appendix containing the Object Pascal Report
>(assuming Apple willing).

I would tend to agree that the documentation is not as good as it might be,
the lack of OP information being the most glaring example, but it is much
better written and usable than the "reference" manuals that Apple produces.
At least you can use the THINK manuals to learn how to do things -- with the
MPW manuals you have to know a lot more to get value from them (fortunately,
MPW is enough like unix that most of us have a leg up on it).  The OP infor-
mation in the Apple manuals is close to useless to a beginner (IMHO).


-- 
Dennis Cohen
Claris Corp.
------------
Disclaimer:  Any opinions expressed above are _MINE_!