| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Function args |
Hi,
The other day i was playing around with a function until i realized that
i was re-writing vsprintf() :) but a question remains.
Is it at all possible to send variable type and number of args to a
function, and determine the types and number of them at runtime ?
eg. void foo(char*,...);
foo("hello",10,5.6,'o');
foo(10.7,90,"Hello",'i',90,80);
This may not make any sense, but i'm curious if there is a way of doing it.
If there is, how would i then check for the type ?
L8r Frank(fadam{at}ozemail.com.au)
___ Blue Wave/DOS v2.21
--- Maximus 3.01
* Origin: The Software Parlour (3:635/544)SEEN-BY: 50/99 78/0 620/243 623/630 632/349 635/503 544 727 711/401 409 410 SEEN-BY: 711/413 430 808 809 932 934 712/515 713/888 714/906 800/1 7877/2809 @PATH: 635/544 50/99 711/808 809 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.