Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!usc!zaphod.mps.ohio-state.edu!van-bc!ubc-cs!uw-beaver!Teknowledge.COM!unix!hplabs!hp-pcd!hp-sdd!ncr-sd!ncrcae!hubcap!chrisb From: chrisb@hubcap.clemson.edu (Chris Behrens) Newsgroups: comp.lang.pascal Subject: How to use optional procedure params in TP 4.0 Message-ID: <8318@hubcap.clemson.edu> Date: 12 Mar 90 00:06:22 GMT Organization: Clemson University, Clemson, SC Lines: 17 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