Hacker News new | ask | show | jobs
by c3d 847 days ago
See the code around here to answer that question:

Definition of 'if' statement: https://github.com/c3d/xl/blob/fast/src/builtins.xl#L155

  // If-then-else statement
  if [[true]]  then True else False   is True
  if [[false]] then True else False   is False

  if [[true]]  then True              is True
  if [[false]] then True              is false
Definition of loops (https://github.com/c3d/xl/blob/fast/src/builtins.xl#L222)

  // Loops
  while Condition loop Body is
      if Condition then
          Body
          while Condition loop Body
  until Condition loop Body               is { while not   Condition loop Body }
  loop Body                               is { Body; loop Body }
  for Var in Low..High loop Body is
      Var := Low
      while Var < High loop
          Body
          Var := Var + 1