User Tools

Site Tools


compare_symbols_numeric

Compare symbols to numerics

Since in VO symbols really are a numeric value, some statements work:

local aField as array
local nSearch as usual
local nPos as dword

aField := { #Chris, #Robert, #Fabrice, #Nikos }
nSearch := 5
nPos := AScan( aField, nSearch )

In X# with the Vulcan runtime this code gives an exception.

Even this code compiles and runs without error:

local nSearch as usual
local nPos as dword

nSearch := 5
nPos := 5
  
if nSearch == #Hallo
endif
if nPos == #Hallo
endif

This code does not compile even in VO :

if 5 == #Hallo
compare_symbols_numeric.txt · Last modified: 2018/03/21 16:02 by wolfgangriedmann