Only a 'Tick'

Everything else that doesn't fall into one of the other PB categories.
User avatar
Michael Vogel
Addict
Addict
Posts: 2663
Joined: Thu Feb 09, 2006 11:27 pm
Contact:

Only a 'Tick'

Post by Michael Vogel »

Double quotes can be used for strings (s.s=~"\"") but a single tick does not work for a code like a.a=~'\''.

Not the most important thing in the world, but would be fine to have a more readable code instead of using the value 39 like in the following example code:

Code: Select all

DataSection
Data.a 'D', 'a', 't', 'a', '.', 'a', 39, 'D', 39, ',', 39, 'a', 39, ',', 39, 't', 39, ',', 39, 'a', 39
EndDataSection
User avatar
mk-soft
Always Here
Always Here
Posts: 5313
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: Only a 'Tick'

Post by mk-soft »

Perhaps with own constants

Code: Select all

#QUOTE = 39
#DQUOTE = 34

DataSection
  label:
  Data.a 'D', 'a', 't', 'a', '.', 'a', ' ', #QUOTE, 'D', #QUOTE, ',', #QUOTE, 'a', #QUOTE, ',', #QUOTE, 't', #QUOTE, ',', #QUOTE, 'a', #QUOTE
  Data.a 0
EndDataSection

Debug PeekS(?label, -1, #PB_Ascii)
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Post Reply