IIF() functionality

BlitzMax Forums/BlitzMax Programming/IIF() functionality

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Use this if you like:

Function IIF:Object(condition, result1:Object, result2:Object)
If condition Then Return result1 else Return result2
End Function

This will be slower than just doing an if then, and also you will in many cases need to cast the result, but hey.