Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / calling functions using variables how???

Author
Message
privaliged
21
Years of Service
User Offline
Joined: 1st Jun 2003
Location: United Kingdom
Posted: 3rd Jun 2003 02:44
does anyone know if it is possible to make a functions run if a certain value comes up as a variable and have different functions for different values without using extended "if" statements.
logic: the most abstract of arts
Nilrem
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: United Kingdom
Posted: 3rd Jun 2003 02:47


Is this what you are after privaliged?

I hear and I forget. I see and I remember. I do and I understand.
the_winch
21
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 3rd Jun 2003 03:23
The only way to do it is with if statments. You can put the if statments in a function that calls the other functions.
privaliged
21
Years of Service
User Offline
Joined: 1st Jun 2003
Location: United Kingdom
Posted: 3rd Jun 2003 03:58
you mean there is no better way than shown

logic: the most abstract of arts
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 3rd Jun 2003 04:29
some other options are

if condition then result

or

case/select

or if that function was similar in all regards

functionname(parameter)

andrew11
21
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 3rd Jun 2003 04:30
You can shorten it like this:



"Food is güd!" -Dean
"All programmers are playwrites and all computers are lousy actors" -Anon
Click Here!!!
privaliged
21
Years of Service
User Offline
Joined: 1st Jun 2003
Location: United Kingdom
Posted: 3rd Jun 2003 04:46
thx case/select was what i was looking for

logic: the most abstract of arts

Login to post a reply

Server time is: 2024-09-20 09:38:32
Your offset time is: 2024-09-20 09:38:32