Assigned (Compiler Magic Function)

From RemObjects Software

Jump to: navigation, search

This is a Oxygene Language Feature topic
Feel free to add your notes to this topic below.



Assigned is a nicer way to check a value against nil. There isn't anything more to it.
As you can see in the sample below, both way to check against nil work exactly the same.
But using "assigned" can reduce some optical noise:

var someValue := GetSomeValue();

if someValue <> nil then
  ...
if assigned(someValue) then
  ...

Futures (Oxygene)

Assigned will return if the result if a future is assigned or not, not the future itself. Use FutureAssigned to check if a future is assigned or not.


See Also


Product: RemObjects Oxygene (formerly known as Chrome)
Current version: 3.0 Previous Versions: 'Joyride' (2.0), 'Floorshow' (1.5), 'Adrenochrome' (1.0)

GlossaryKeywordsLanguage FeaturesPlatform FeaturesSamplesArticlesHow ToIssues

Personal tools