Shop OBEX P1 Docs P2 Docs Learn Events
Carriage-return on a BS1 — Parallax Forums

Carriage-return on a BS1

mojorizingmojorizing Posts: 249
edited 2007-11-01 15:18 in BASIC Stamp
The following code doesn't compile because of the "CR" or carriage-return

SEROUT  1, T2400, ("!AT0CIP:192.168.120.250",  CR)



I'm using a BS1 with Basic Stamp software ver 2.3.9

What gives? I thought CR was a valid command.....

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Bad spellers of the world untie!

Comments

  • Steve JoblinSteve Joblin Posts: 784
    edited 2007-10-31 23:43
    is it because of the spaces between the comma and thr "CR"?
  • mojorizingmojorizing Posts: 249
    edited 2007-10-31 23:52
    No, the use of the space was taken from examples of the SEROUT command in the folders included in the BS IDE software. I tried without the space, still won't complile. I haven't used a BS1 in years, I just need it to load configuration into a SimpleLAN.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Bad spellers of the world untie!
  • Steve JoblinSteve Joblin Posts: 784
    edited 2007-11-01 00:01
    Here is a code snippit from the HELP section of the Parallax Editor... can you try this and see if it compiles?

    SEROUT 1, N2400, ("HELLO", CR)
  • mojorizingmojorizing Posts: 249
    edited 2007-11-01 00:11
    Hi Steve,
    I just tried that, it doesn't like the CR, it expects a constant or variable. Substituting with the number 13 makes it work because 13= CR in Ascii, but I'd still like to know why it's not taking CR.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Bad spellers of the world untie!
  • Steve JoblinSteve Joblin Posts: 784
    edited 2007-11-01 00:17
    me too! seems strange!

    Anyone around that isn't out tricker-treating that can help this poor guy? Anyone? Anyone?
  • Mike GreenMike Green Posts: 23,101
    edited 2007-11-01 02:00
    The BS1 actually uses a separate (and older) compiler than the BS2. The IDE just invokes the proper "tokenizer" for the processor being used. I suspect that CR is not predefined in the BS1 compiler. Just define it as a symbol: "SYMBOL CR = 13".
  • mojorizingmojorizing Posts: 249
    edited 2007-11-01 15:18
    I think you're right, Mike. Looking back on some early docs. on the BS1, that's how a carriage return is handled.

    Thanks for the replies.

    Kevin

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Bad spellers of the world untie!
Sign In or Register to comment.