|
|
Alain Martel <kua### [at] videotronca> wrote:
> > On 2024-08-22 15:53 (-4), Leroy wrote:
> >>
> >> Like this :: #declare Tab=array[4]{ 1 2 3 4 }
> >>
> >> I was going to go back and put commas in but forgot and ran it anyway and It
> >> still worked!
> >>
> >> So I tried ::
> >> #declare Sf=array[4]{"a" "b" "c" "d"}
> >> #declare Sf=array[4]{<1,2,3> <1,2,3> <1,2,3> <1,2,3>}
> >>
> >> They also worked !
> >
> > Be careful with this. Don't get burned by a leading '+' or '-'.
> >
> Like this :: #declare Tab=array[4]{ 1 -2 3 -4 }
> That parse as :: #declare Tab=array[4]{ -1, -1, 0, 0 }
> Or this :: #declare Tab=array[4]{ +1 -2 +3 -4 }
> That parse as :: #declare Tab=array[4]{ -2, 0, 0, 0 }
More funk!
I didn't think about trying negative numbers!
Won't be using that little trick for much.
It was just something I wasn't expecting.
Post a reply to this message
|
|