Null object: Difference between revisions
Content added Content deleted
Puppydrum64 (talk | contribs) No edit summary |
(Added solution for Action!) |
||
Line 88: | Line 88: | ||
.include "../includeARM64.inc" |
.include "../includeARM64.inc" |
||
</lang> |
</lang> |
||
=={{header|Action!}}== |
|||
<lang Action!>TYPE Object=[ |
|||
BYTE byteData |
|||
INT intData |
|||
CARD cardData] |
|||
PROC IsNull(Object POINTER ptr) |
|||
IF ptr=0 THEN |
|||
PrintE("Object is null") |
|||
ELSE |
|||
PrintE("Object is not null") |
|||
FI |
|||
RETURN |
|||
PROC Main() |
|||
Object a |
|||
Object POINTER ptr1=a,ptr2=0 |
|||
IsNull(ptr1) |
|||
IsNull(ptr2) |
|||
RETURN</lang> |
|||
{{out}} |
|||
[https://gitlab.com/amarok8bit/action-rosetta-code/-/raw/master/images/Null_object.png Screenshot from Atari 8-bit computer] |
|||
<pre> |
|||
Object is not null |
|||
Object is null |
|||
</pre> |
|||
=={{header|ActionScript}}== |
=={{header|ActionScript}}== |
||
<lang actionscript>if (object == null) |
<lang actionscript>if (object == null) |