Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

procedures

Posted on 1997-10-13
2
Medium Priority
?
231 Views
Last Modified: 2010-04-16
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?
0
Comment
Question by:batgirl101397
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 2

Accepted Solution

by:
kellyjj earned 200 total points
ID: 1216194
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
 

Author Comment

by:batgirl101397
ID: 1216195
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

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
Are you an Exchange administrator employed with an organization? And, have you encountered a corrupt Exchange database due to which you are not able to open its EDB file. This article will explain all the steps to repair corrupt Exchange database.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question