chrisb@hubcap.clemson.edu (Chris Behrens) (03/12/90)
I have scoured the FM (from "RTFM") and have not found how to write a procedure using optional parameters. What I mean by optional parameters can best be described by an example. The given procedure INC, or increment, takes as params an integer to be incremented, and a value which is optional to use as the offset to add to the integer. i.e. INC(value) is value := value + 1 and INC(value,offset) is value := value + offset. Now, how can I write my own procedure which uses optional params ??? Maybe something like ADD which will take any number of params and add them : ADD(ans,val1,val2,...,valx) or ADD(ans,val1,val2,...,valx,valx+1). Where ans is the sum of val1+val2...valx. Is this clear ??? Any help appreciated !!! (P.S. This is NOT a class assignment. :-) ) Chris Behrens ChrisB@Hubcap.Clemson.Edu