Shop OBEX P1 Docs P2 Docs Learn Events
Escape char for "\" ?? — Parallax Forums

Escape char for "\" ??

ALIBEALIBE Posts: 299
edited 2006-09-10 20:18 in Propeller 1
Hi all,

please try this code below - ·the "\" char prints as "¥"

am I to "escape seq" the "\" char?

thanks, ALIBE
CON 
  _clkmode = xtal1 + pll16x ' use crystal x 16 
  _xinfreq = 5_000_000 

OBJ 
  lcd : "serial_lcd" 
  delay : "timing" 


PUB main | Cycle 
  if lcd.start(0, 19200, 2) 
    Cycle:=string("-\|/") 
    lcd.cls ' setup screen 
    lcd.backlight(1) ' backlight on 
    lcd.gotoxy(0,1) 
    lcd.str(Cycle)

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2006-09-10 15:08
    Which LCD are you using? It may be that's the way the character is defined in the font table in the LCD.
  • ALIBEALIBE Posts: 299
    edited 2006-09-10 15:10
    Mike,
    the parallax 2 line Serial LCD.
  • ALIBEALIBE Posts: 299
    edited 2006-09-10 15:12
    Mike, I just looked in the documentation. You're right, they don't seem to have a "\" but, instead "¥"

    thanks for catching that.

    So, is the only way to showing a "\" is by defining a DAT custom char?
  • ALIBEALIBE Posts: 299
    edited 2006-09-10 15:30
    I found in the doc that to display "\", we can send command "Dec 0" and of course using the custom char defn

    thanks all
  • Mike GreenMike Green Posts: 23,101
    edited 2006-09-10 20:18
    ASCII doesn't have any of the international currency symbols included in the character set, so many countries have used the less frequently used punctuation symbols for their currencies like the Yen, the Pound, Euro, etc. and "|" and "\" are often the first to go.
Sign In or Register to comment.