Skip to the content
Documentation

This code will give you unexpected results

No ratings yet

This code:

{def $myvar = first_set($myobject.contentobject.data_map.my_integer_var.data_int, 0)}
MYVAR = {$idanag}; {$myobject.contentobject.data_map.my_integer_var.data_int}

will display
MYVAR = ; 0
instead of
MYVAR = 0; 0
so, first_set handles 0s as "unset". this either needs to be documented or marked as a bug.

Comments (1 historical)

Written by readers of the earlier documentation sites, kept as they were.

  1. Re: This code will give you unexpected results

    André ·

    I guess moste people will see what this person did wrong here.
    1.$idanag is not defined as far as I can see. Debug is your friend.
    2. a value of 0 = is_set, its not true but it's set. But the ouput would be the same anyway.