TIP: Click on subject to list as thread! ANSI
echo: aust_c_here
to: David Nugent
from: Frank Adam
date: 1996-04-23 16:30:04
subject: Function args

G'Day David,
 
-=> Quoting David Nugent to Frank Adam <=-

Thanks for this..

 DN> /* Warning: untested, unchecked code follows :-) */

 DN> enum { T_end =-1, T_int, T_ptr, T_long };
 DN> void foo(int f,...)
 DN> {
 DN> int t;
 DN> va_list arg;
 DN> Not great code, but it should provide a starting point.

It's good, this is the best idea i've had so far :-)
But as i thought there is no way of not supplying a specifier for the 
variables.
I may just have a play with it now :-)
Actually i never did look at pointer's sizes before,and i always thought
that the size of the pointer would be an indicator to the type. 
That theory got killed pretty quick, in a switch(sizeof(ptr)) test.
Oh well, learn s'thing every day... 

  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™.