Page 1 of 1

BUG: Variables not working, if TAB is used as spacer

Posted: Fri 16 Dec 2022 10:08
by hendrik.haehnel
Dear Didier,
I have found the following undesired behaviour:
If TAB spaces are used to separate the parameters of an element, VARIABLES placed as parameters will not work.

Screenshot 2022-12-16 100617.png
Screenshot 2022-12-16 100617.png (16.83 KiB) Viewed 3257 times
Using normal space characters everything works as expected.
Could you fix that? It is nice to structure the file with tab spaces for visibility.

Best regards,
Hendrik

Re: BUG: Variables not working, if TAB is used as spacer

Posted: Fri 16 Dec 2022 11:29
by Didier
Dear Hendrik,

Are you sure that TAB_space is the problem here
I think the rigth syntax should be "Line: Multipole 1 100 100 0 26"
And yes the manual is not clear, it's 0 for B and 1 for E.

Regards,

Didier

Re: BUG: Variables not working, if TAB is used as spacer

Posted: Fri 16 Dec 2022 11:32
by hendrik.haehnel
Yes, I can replicate with a drift:
Screenshot 2022-12-16 113130.png
Screenshot 2022-12-16 113130.png (15.86 KiB) Viewed 3252 times
Best regards,
Hendrik

Re: BUG: Variables not working, if TAB is used as spacer

Posted: Fri 16 Dec 2022 12:43
by Didier
Sorry I didn't understand what you were trying to show me with this new error

Regards,

Didier

Re: BUG: Variables not working, if TAB is used as spacer

Posted: Fri 16 Dec 2022 12:48
by hendrik.haehnel
The Syntax is correct, but the TAB spaces generate this error. My Multipole definition was correct. The issue is with tabstop characters and variables.

so
"VARIABLE driftlength 10"
"DRIFT [SPACEBAR] driftlength [SPACEBAR] 8.75" --> works without error

"VARIABLE driftlength 10"
"DRIFT [TAB] driftlength [TAB] 8.75" --> throws the error

Best regards,
Hendrik

Re: BUG: Variables not working, if TAB is used as spacer

Posted: Fri 16 Dec 2022 14:29
by Didier
Sorry for my misunderstanding, I didn't realise you were using the 'VARIABLE' command.
Okay, that's fixed.

Regards,

Didier

Re: BUG: Variables not working, if TAB is used as spacer

Posted: Fri 16 Dec 2022 15:06
by hendrik.haehnel
It is working now, thank you ;)

Best regards,
Hendrik