[Home]004d

HomePage | RecentChanges | Preferences

jf iLabel

Description

Jumps only if the last evaluated if-block (see 00d6) returned false.

Parameters

iLabel
Label to jump to.

Example

if 0
  is_defined $hPlayer
jf @NoPlayer
  get_player_car $hPlayer, $hCar
@NoPlayer

Comments

Working with 'jump if false' instead of 'jump if true' may seem weird at first, but it actually allows for easier writing of conditional code. With jt, the code for if [conditions] then [statements] becomes:

if
  [conditions]
jt @DoStatements
jump @SkipStatements
@DoStatements
  [statements]
@SkipStatements
Whereas with jf, it becomes:
if
  [conditions]
jf @SkipStatements
  [statements]
@SkipStatements

See 0002 for label commentary.


CategoryStructuralOpcodes

HomePage | RecentChanges | Preferences
This page is read-only | View other revisions
Last edited October 16, 2004 1:44 pm by CyQ (diff)
Search:
SourceForge.net Logo