line continuation character


Closed Thread
Results 1 to 6 of 6
  1. #1
    Join Date
    Jun 2016
    Posts
    60

    Default line continuation character

    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
    Last edited by Alberto; - 26th January 2017 at 12:08.

  2. #2
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default Re: line continuation character

    Yes, Alberto That is correct.
    Dave Purola,
    N8NTA
    EN82fn

  3. #3
    Join Date
    Jun 2016
    Posts
    60


    Did you find this post helpful? Yes | No

    Default Re: line continuation character

    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

  4. #4
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default Re: line continuation character

    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?
    Dave Purola,
    N8NTA
    EN82fn

  5. #5
    Join Date
    Feb 2013
    Location
    Quebec, Canada
    Posts
    67


    Did you find this post helpful? Yes | No

    Default Re: line continuation character

    You need to add some comas:

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

  6. #6
    Join Date
    Jun 2016
    Posts
    60


    Did you find this post helpful? Yes | No

    Default Re: line continuation character

    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

Similar Threads

  1. character return from PIC to VB
    By macinug in forum Serial
    Replies: 6
    Last Post: - 29th April 2009, 12:58
  2. Can It Be this SIMPLE? (the Off-Topic continuation)
    By Mike_Lynch in forum Off Topic
    Replies: 63
    Last Post: - 28th August 2006, 16:08
  3. LCD Character Generator
    By crematory in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 20th September 2005, 17:07
  4. Line continuation
    By stratus in forum mel PIC BASIC
    Replies: 3
    Last Post: - 14th June 2005, 09:17
  5. 2 Line Chars on a 2 Line LCD
    By Squibcakes in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 16th November 2003, 01:44

Members who have read this thread : 2

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts