Ed,

I believe the example uses the "?" conditional operator.

It works like this:

[test expression] ? [statement if true] : [statement if false]

The defined() function returns an integer, presumably 0 (false) or 1 (true).

I'll check with the programmers to see if there is supposed to be a newline somewhere in this example. I believe there is supposed to be one before 'defined("var2") == 1'. That would make the example above make sense.

Best,

Bob Merrill

----- Original Message ----- From: "Konowal, Ed" <[EMAIL PROTECTED]>
To: "InterMapper Discussion" <[email protected]>
Sent: Friday, October 24, 2008 4:27 PM
Subject: [IM-Talk] Probe functions


I'm looking at probe functions and I don't understand the explanation
for function 'defined'

The help file (http://download.dartware.com/docs/DevGuide/) says...

FUNCTION defined(variable:STRING):INTEGER;

Examples:  $var1 := 1; defined("var1") == 1 defined("var2") == 1 ?
"$var2 is defined" : "$var2 is undefined"


1) What does INTEGER have to do with defined?  Is it needed?

2) The online example says $var2 is both defined and undefined... is
that a mistake?

3) What does defined("var1") == 1 mean?  is "var1" the variable or the
STRING as shown in the help file above
"defined(variable:STRING):INTEGER".



____________________________________________________________________
List archives:
http://www.mail-archive.com/intermapper-talk%40list.dartware.com/
To unsubscribe: send email to: [EMAIL PROTECTED]


____________________________________________________________________
List archives: http://www.mail-archive.com/intermapper-talk%40list.dartware.com/
To unsubscribe: send email to: [EMAIL PROTECTED]

Reply via email to