Shop OBEX P1 Docs P2 Docs Learn Events
case-sensitive? — Parallax Forums

case-sensitive?

FarthinderFarthinder Posts: 9
edited 2009-04-18 16:41 in Propeller 1
Im writing a driver for a HD44780 LCD (if anyone is interested i will post it here when im finished), and i would be much helped if there is a way to make the SPIN-code case-sensitive so that it can tell the difference between PUB A and PUB a for example.

Also is there a way to make "-" be a normal symbol like a, b, c, and not mean Minus so that i can name a PUB or CON -?

Comments

  • virtuPICvirtuPIC Posts: 193
    edited 2009-04-18 16:01
    Sorry, you cannot change the syntax of a programming language. Although sticking to it is sometimes uncomfortable it's sensible: You can talk about programs, exchange them, combine them...

    You can write a preprocessor that converts your SPIN dialect to native SPIN. But you should be clear about the consequences.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Airspace V - international hangar flying!
    www.airspace-v.com/ggadgets for tools & toys
  • FarthinderFarthinder Posts: 9
    edited 2009-04-18 16:06
    I am fairly new to programing and even newer to SPIN/propeller but i think i remember in C++ you can write "-" instead of just - and it will treat it as a letter instead of a math symbol. Spin has nothing like that?
  • jazzedjazzed Posts: 11,803
    edited 2009-04-18 16:41
    Welcome to the forum. Yes you can write "-" in spin, but it means character rather than string as in C/C++. C++ has overload concepts and can redefine any operator. With virtually unlimited memory as with a PC or Linux you can do anything. Propeller is a microcontroller with a small fixed amount of program memory and the constraints that come with it.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --Steve


    Propalyzer: Propeller PC Logic Analyzer
    http://forums.parallax.com/showthread.php?p=788230
Sign In or Register to comment.