PDA

View Full Version : line continuation character



Alberto
- 26th January 2017, 11:56
I need to arraywrite a long string (173 characters) but cannot find any reference to the continuation character and how to use it!

Anybody can help me?

thank you

Alberto

Edited: OK I finally have found the page! Page 61 of the manual and the correct spelling is: Line Extention and the caracter is the underscore (_)

But still have some problem on how to use it.

Arraywrite string,["abcdefghiklmn"_

"opqrstuvwxz"_

"1234567890",13,10]

is this the corrected way to use it?

Tank you again

Alberto

Dave
- 26th January 2017, 12:29
Yes, Alberto That is correct.

Alberto
- 26th January 2017, 13:41
Thank you Dave for the quick response.

Unfortunatly I am not able to write the string in three lines neither in two lines, I get an error 346 Expected "]" but the "]" is there!

The actual string contains an underscore in the text "private_key" could it be the reason?

Fortunatly the whole string stay in one single line and the code compile, but I wonder why I cannot use the line extention.

Alberto

Dave
- 26th January 2017, 17:01
Alberto, I have used this line extention quite a bit in the past like this:
lookup2 (CHARACTER - 32),[$0000,$0030,$0202,$12CE,$12ED,$2424,$0B59,$0200,$0 039,$000F,$3F00,$12C0,$2000,_
$00C0,$4000,$2400,$243F,$0406,$00DB,$00CF,$00E6,$0 0ED,$00FD,$0007,$00FF,$00E7,_
$1200,$2200,$0C00,$00C8,$2100,$1421,$2D3F,$00F7,$1 28F,$0039,$120F,$00F9,$00F1,_
$00BD,$00F6,$1209,$001E,$0C70,$0038,$1536,$0936,$0 03F,$00F3,$083F,$08F3,$018D,_
$1201,$003E,$2430,$2A36,$2D00,$1500,$2409,$0039,$0 900,$000F,$2800,$0008,$0100,_
$00DF,$0878,$00D8,$208E,$0079,$0071,$018F,$00F4,$1 000,$000E,$0C30,$1200,$10D4,_
$1050,$00DC,$0471,$08E3,$0050,$018D,$0078,$001C,$2 010,$2814,$2D00,$028E,$2409,_
$2149,$1200,$0C89,$00C0,$3FFF],OUTWORD

I wonder if the Arraywrite string command has the issue?

MichelJasmin
- 26th January 2017, 18:17
You need to add some comas:



Arraywrite string,["abcdefghiklmn", _
"opqrstuvwxz", _
"1234567890",13,10]

Alberto
- 26th January 2017, 18:42
Thank you Michel, thank you Dave, yes it was the missing coma!

Now I can continue with my coding knowing that I can break a long line of code.

cheers

Alberto