procedures

How do I write a procedure (or function) that can take one or more variables of any data type? (For example, the WriteLn procedure can take any data type)? The WriteLn procedure can also take a unpredecided number of variables. How do I do that?
batgirl101397Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
kellyjjConnect With a Mentor Commented:
The way you would do something like that is this:

procedure myown(var1,var2)
begin
end;

In pascal (at least TP) you can pass untyped variables to procedures. However, it is up to you to make sure you write your code in such a way that it will handle most anything you  will pass it without crashing.  Now you might want to check the exact syntax on the above.  I have only done this a couple of times and that was a while ago.
I hope this helps.
Out of curosity, why would you want to pass it some thing untyped??  write me let me know kellyj@r2d2.bpginc.com
0
 
batgirl101397Author Commented:
Oki. Can you explain how to make an untyped variable? And that still doesn't explain how to send a free number of variables to the procedure.
                                           /Lars, Sweden
0
All Courses

From novice to tech pro — start learning today.