Focal Point
[SOLVED] amper var across multiple lines

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/988102042

September 15, 2009, 01:41 PM
jodye
[SOLVED] amper var across multiple lines
Hi

This might seem like a strange question, but for debugging purposes and for making DM code easier to read, I would like to span an amper variable across multiple lines. something like...

-SET &X='AB'; becomes...

 -SET &X = 'A' _
'B';
 


I do not want to append the text with | though.

Is it possible? Is there a line continuation that I am unaware of?

Thx

Jodye

This message has been edited. Last edited by: Kerry,


WF 8.0.0.5M
September 15, 2009, 01:50 PM
GamP
I have tried it in a few different ways, and the only one that came out right is:
-SET &X = 'A'|
-'B';

-TYPE &X.LENGTH &X

Hope this helps ...


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
September 15, 2009, 02:11 PM
j.gross
-SET can span multiple lines; same goes for -IF. That's why they need the closing semicolon. -- Until the semicolon is encountered, a continuation line is expected.

The continuation lines need an opening dash, just to distinguish them from (non-Dialog Manager) Focus code. Nothing special to identify them as a continuation.

-SET &THIS = 'First part'
- 'Second part';

won't work, because the two quoted literals are logically adjacent -- you need to supply an operator between them, as GamP illustrated.

But the operator can go anywhere in-between, first line, last line, even on a separate line ...
-SET &THIS = 
-   'First part'
- |
-   'Second part'
- ;



- Jack Gross
WF through 8.1.05
September 16, 2009, 10:40 AM
jodye
Thanks for the info guys.


WF 8.0.0.5M