Is there an IIF() method someone can help me find? Example from a C dialec I use:
// ------------------------------
// C-ish syntax
// you can see that that our function returns a string
// we are testing to see if name__ is set, if it is we will return it, if it isnt we will return "(unset name)"
nomask string query_name() {
return name__ ? name__ : "(unset name)";
}
// ------------------------------
// here is a more complicated example
// here its being used in-line to pre-pend a space to the arg variable, but only if it existed
if(body__->do_command(query_verb() + (arg ? " " + arg : "")))
// C-ish syntax, example of calling methods
b = ((x = 100)? x : z_func() );
b will equal x if its 100, other wise it will equal whatever is returned by z_func()
Is there anything like this in Pascal? I need the function to be able to call methods also.