Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Xbase DO CASE indention
Message
De
30/01/2013 15:09:34
 
 
À
30/01/2013 12:02:33
Information générale
Forum:
Humor
Catégorie:
Autre
Divers
Thread ID:
01564657
Message ID:
01564719
Vues:
34
Then you replace lcTest with
lcTest = "This is a value " + ;
 "that continues around to here"

or, if you want two separate lines

lcTest = "This is a value " + chr(13) + ;
 "that continues around to here"
and it's no longer a problem.

I've never liked continuation lines like that - to many times I've been bitten in the butt by someone 'making the code pretty' and not paying attention to things like that. Then it becomes a maintenance problem when, in reality, it never should have been there in the first place.


>
>Some of the code I inherit uses embedded CR/LF in literal strings (via line continuations). Older versions of beautify do not honor that string continuation properly, and subsequently indent everything to where it "thinks" it should be, rather than where it logically should be. This causes issues.
>
>
* Original code sample left-justified:
>IF .T.
>IF .T.
>lcTest = "this is a value ;
>that continues around TO here"  && Note the quotes start and end on two separate lines
>? lcTest
>ENDIF
>ENDIF
>
>* In VFP9, it correctly indents it, leaving the left-justified string continuation:
>IF .T.
>    IF .T.
>        lcTest = "this is a value ;
>that continues around TO here"
>        ? lcTest
>    ENDIF
>ENDIF
>
>* In FPW 2.6, it does not, and indents the continuation line:
>IF .T.
>    IF .T.
>        lcTest = "this is a value ;
>            that continues around TO here"
>        ? lcTest
>    ENDIF
>ENDIF
>* Several unwanted tabs have just been introduced into the literal string via FPW 2.6's Beautify
>* Turning off indented continuation lines makes it even worse.
>
>
>I'll grant that this is another coding style which should have a fine associated with it... but that's another thread. :-)
"You don't manage people. You manage things - people you lead" Adm. Grace Hopper
Pflugerville, between a Rock and a Weird Place
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform