Special Variables

Certain variables are reserved in Vortex for special uses. Most of these (like $url) are set automatically by Vortex, and should not be assigned to by a Vortex script. Many statements set some of these variables, perhaps including statements the programmer may be unaware of. Thus it is best practice when using their values to first save the value to a local variable, immediately after the desired statement. This can avoid an intermediate statement - perhaps added unknowingly later - from altering the value. E.g.:

<sql "select Column from myTable">
  ...
</sql>
<local iterations=$loop>   <!-- preserve it immediately -->
...
<functionCallAddedLaterThatMightChangeLoop>
...
<if $iterations eq 0>
  No Column rows found
</if>



Copyright © Thunderstone Software     Last updated: Jun 15 2022
Copyright © 2022 Thunderstone Software LLC. All rights reserved.