Hi. Question: In a function that takes multiple arguments, each with a
default value set[EX: void blah(int one=1, int two=2, int three=3);]is
there anyway to either alter the order of the parameters you pass to it
or skip the passing of certain parameters[sort of like(if I wanted to
let "two" take on the default): blah(12, three=53); or blah(12,,53); or
blah(12,default,53);]?
I'm mainly asking because lately I've had to do some gui programming,
calling a widget function that takes like 80 defaulted arguments, with
only a single one I want to alter, makes me hate life.
Sorry if there's recently been a similar post.
Thanks. 2 1409
xideum wrote: Hi. Question: In a function that takes multiple arguments, each with a default value set[EX: void blah(int one=1, int two=2, int three=3);]
This isn't C; C's function arguments do not have
default values. You must be thinking of some other
programming language.
-- Er*********@sun.com
On 24 Mar 2005 07:01:24 -0800, "xideum" <xi****@gmail.com> wrote: Hi. Question: In a function that takes multiple arguments, each with a default value set[EX: void blah(int one=1, int two=2, int three=3);]is there anyway to either alter the order of the parameters you pass to it or skip the passing of certain parameters[sort of like(if I wanted to let "two" take on the default): blah(12, three=53); or blah(12,,53); or blah(12,default,53);]?
I'm mainly asking because lately I've had to do some gui programming, calling a widget function that takes like 80 defaulted arguments, with only a single one I want to alter, makes me hate life.
Sorry if there's recently been a similar post.
You should ask in a group which deals with your programming language
(which is obviously not C, the language this group deals with). Have
you considered writing a wrapper function which takes your one
argument and expands it to a call with all 80 arguments?
--
Al Balmer
Balmer Consulting re************************@att.net This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: domeceo |
last post by:
can anyone tell me why I cannot pass values in a setTimeout function
whenever I use this function it says "menu is undefined" after th
alert.
function imgOff(menu, num) {
if (document.images) {...
|
by: laredotornado |
last post by:
Hello, I am looking for a cross-browser way (Firefox 1+, IE 5.5+) to
have my Javascript function execute from the BODY's "onload" method,
but if there is already an onload method defined, I would...
|
by: Mike MacSween |
last post by:
Just spent a happy 10 mins trying to understand a function I wrote sometime
ago.
Then remembered that arguments are passed by reference, by default.
Does the fact that this slowed me down...
|
by: pratik |
last post by:
i am working a turbo c;
the code i typed in is as follows
#include<stdio.h>
main()
{
int a=5;
printf("%d%d%d",a++,++a,a);
}
The output of the above code is very interesting.
can anyone help...
|
by: Martin Johansen |
last post by:
Hello C programmers
If I have a function, say
void f(int a, char b);
And I call this function with the following arguments
char a;
int b;
|
by: enjoying the view |
last post by:
I am working on a school project, trying to build a simple RPC stub
generator. The idea is that the generator takes a normal python file
with functions defined in it and produces a client and...
|
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...
|
by: Larax |
last post by:
Best explanation of my question will be an example, look below at this
simple function:
function SetEventHandler(element)
{
// some operations on element
element.onclick =
function(event)
{
|
by: Janus |
last post by:
Hi,
Is there a way to pass arguments to the callback function used inside
an addEventListener?
I see that I can only list the name of the callback function.
For eg, I use this:
var...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
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...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
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,...
|
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...
|
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...
| |