🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #50257

runtime variable argcount

#50257
From: Tom Legrady
Date: Fri, 05 Nov 1993 12:41
30 lines
1732 bytes
People seem to have misunderstood my question. I know how to use
va_list, va_start, va_arg and va_end. My problem is determining at run
time rather than at compile time how to invoke a function.

Consider the folling pseudo-code:

	Read name of function to invoke
	read number of input arguements.
	loop:
	  read an input arguement.

	invoke  function with arguements.

You can't simply say 

	function( arg1, arg2, arg3 arg4 )

cause there may not be an arg4. On the other hand, However many args
you list, there could always be more.

I'm working with gcc / g++ 2.4.5 on a Sun Sparc Classic with SUNOS 4.1.3c

Tom legrady
--
......................................................................
Tom Legrady                                   Tom.Legrady@Prograph.Com
Straight but not narrow                         (902) 455-4446 ext 254
......................................................................
				   
Technical Details
Message-ID: <TLEGRADY.93Nov5084309@net.Prograph.COm>
Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!sol.ctr.columbia.edu!math.ohio-state.edu!cs.utexas.edu!uunet!newsflash.concordia.ca!owl.nstn.ns.ca!nstn.ns.ca!tlegrady
References: <TLEGRADY.93Nov4162352@net.Prograph.COm>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,2a01b0106f0ecbdf
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1993-11-05 04:47:35 PST
Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!sol.ctr.columbia.edu!math.ohio-state.edu!cs.utexas.edu!uunet!newsflash.concordia.ca!owl.nstn.ns.ca!nstn.ns.ca!tlegrady
From: tlegrady@net.Prograph.COm (Tom Legrady)
Newsgroups: gnu.gcc.help
Subject: runtime variable argcount
Date: 5 Nov 1993 08:41:51 -0400
Organization: Prograph International, Inc.
Lines: 30
Sender: news@owl.nstn.ns.ca
Distribution: world
Message-ID: <TLEGRADY.93Nov5084309@net.Prograph.COm>
References: <TLEGRADY.93Nov4162352@net.Prograph.COm>
NNTP-Posting-Host: owl.nstn.ns.ca
In-reply-to: tlegrady@net.Prograph.COm's message of 4 Nov 1993 16:22:40 -0400