Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!uunet!bu.edu!snorkelwacker.mit.edu!thunder.mcrcim.mcgill.edu!quiche!storm From: storm@cs.mcgill.ca (Marc WANDSCHNEIDER) Newsgroups: comp.lang.pascal Subject: Untyped Parameters Summary: Untyped paramters assigned to typed variables Message-ID: <1991Mar4.043821.4742@cs.mcgill.ca> Date: 4 Mar 91 04:38:21 GMT Sender: storm@cs.mcgill.ca (Marc WANDSCHNEIDER) Organization: SOCS, McGill University, Montreal, Canada Lines: 39 As far as I've been led to believe, when one doesn't exactly know what the incoming paramter in a procedure/function is, you can just do the following: procedure hooblah(var x); var y: integer absolute x; z: real absolute x; begin etc.... Using this, the parameter passed can be passed to either an integer or a real number. However, a few days ago, I ran across this in a procedure that convers a decimal number into a HEX number... Function DectoHex (i:Word): St4; {st4 is string[4] declared already} var HexStr: string[8]; b : array[1..2] of BYTE ABSOLUTE i; bt: byte; begin etc... i has already been declared as a typed variable. How is it that it is being used here as an UNTYPED variable..? Any help on this would dearly help my already overloaded brain. Thanks yea. ./*- -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ storm@cs.mcgill.ca McGill University It's 11pm, do YOU Marc Wandschneider Montreal, CANADA know what time it is? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~