473,408 Members | 2,477 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

indefinite number of arguments

I quickly searched the group.

Like the post said, it is not possible to specify indefinite number of
arguments.

http://groups.google.com/group/comp....guments&rnum=1

But I'm wonder with the help of boost, can this take be done?

Thanks,
Peng

Mar 27 '06 #1
3 3040
Pe*******@gmail.com wrote:
I quickly searched the group.

Like the post said, it is not possible to specify indefinite number of
arguments.

http://groups.google.com/group/comp....guments&rnum=1

But I'm wonder with the help of boost, can this take be done?


With or without boost, you can only mimick ab indefinite number of
arguments. The simplest solution is passing a 'vector' of values. This
can be extended to support more than just one type and also to look more
like a function call. But then you are still really passing a fixed
number of arguments (one 'vector' for example).

So strictly speaking, if you have a true indefinite number of
arguments, you cannot possibly determine how many you really have,
without specifying that.

hth
--
jb

(reply address in rot13, unscramble first)
Mar 27 '06 #2
Jakob Bieling wrote:
With or without boost, you can only mimick ab indefinite number of
arguments.


Could you overload operator, and then...

foo(a1, a2, a3, ... aN);

? (the ellipses are narrative)

--
Phlip
http://www.greencheese.org/ZeekLand <-- NOT a blog!!!
Mar 27 '06 #3
Phlip <ph******@yahoo.com> wrote:
Jakob Bieling wrote:
With or without boost, you can only mimick ab indefinite number of
arguments.


Could you overload operator, and then...

foo(a1, a2, a3, ... aN);

? (the ellipses are narrative)


No, but you could do "foo ((a1, a2, a3, ... aN));".

regards
--
jb

(reply address in rot13, unscramble first)
Mar 27 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Steven D'Aprano | last post by:
I'm trying to keep an open mind, but I am perplexed about something in Python that strikes me as a poor design. py> def func(a,b): py> print a,b py> func(1) Traceback (most recent call...
7
by: Kenneth_J | last post by:
Hey everyone, I just started doin some work with access and vba, and don't know much about it yet...any help would be much appreciated. My goal is to create a form in word that can be filled...
2
by: Nad | last post by:
Hello All, I have been trying to get some sort of documantion on how StreamReader.ReadToEnd() finds out if the stream has ended and if anyone can read the following lines and tell me how to...
1
by: Oleg | last post by:
can I have session timeout set to indefinite? Minding that I run it on 2003 server. Oleg
18
by: John Friedland | last post by:
My problem: I need to call (from C code) an arbitrary C library function, but I don't know until runtime what the function name is, how many parameters are required, and what the parameters are. I...
2
by: Alan | last post by:
I have a couple of questions about using a variable number of arguments in a function call (...). The context is that I have some mathematical functions I created. I currently pass them a pair of...
20
by: Casey | last post by:
Is there an easy way to use getopt and still allow negative numbers as args? I can easily write a workaround (pre-process the tail end of the arguments, stripping off any non-options including...
9
by: paragpdoke | last post by:
Hello All. I'm looking for some algorithm to build a combination of strings from multiple arrays. Let me explain in detail. - I'm working on VBA (excel). I have functions that accept one string...
4
vikas251074
by: vikas251074 | last post by:
Loop runs indefinite times. suppose v_router = 5 is entered by user, then following code runs indefinite times i.e. record is inserted indefinite times though each have different i and v_ip_address....
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.