Shop OBEX P1 Docs P2 Docs Learn Events
Stamp Editor V1.096 compiler questions — Parallax Forums

Stamp Editor V1.096 compiler questions

ArchiverArchiver Posts: 46,084
edited 2001-01-03 02:00 in General Discussion
Two questions:

1) Is there a way to include a text file or something like that in my
program? I'd like to have an "include" file with common routines,
constants, etc.

2) If I put constants in my program and those constants aren't used,
does it take up any memory in the stamp? For example, lets say I want
to list out many different baud rates in the program, as follows:

baud8n1-24kinv con 1234
baud8n1-49kinv con 2345
baud8n1-96inv con 16624

Thanks,

Mike

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2000-12-29 21:39
    I do not know of a way to include a file in this verison of the editor.
    Constants never take any variable space. The programmer simply replaces them
    in your code. For example:


    test1 con 8
    debug dec test1

    is the same code after being downloaded as

    debug dec 8

    Hope that helps.

    Michael Hendricks

    Original Message
    From: "Mike Turco" <miketurco@y...>
    To: <basicstamps@egroups.com>
    Sent: Friday, December 29, 2000 4:11 PM
    Subject: [noparse][[/noparse]basicstamps] Stamp Editor V1.096 compiler questions


    >
    > Two questions:
    >
    > 1) Is there a way to include a text file or something like that in my
    > program? I'd like to have an "include" file with common routines,
    > constants, etc.
    >
    > 2) If I put constants in my program and those constants aren't used,
    > does it take up any memory in the stamp? For example, lets say I want
    > to list out many different baud rates in the program, as follows:
    >
    > baud8n1-24kinv con 1234
    > baud8n1-49kinv con 2345
    > baud8n1-96inv con 16624
    >
    > Thanks,
    >
    > Mike
    >
    >
    >
    >
    >
    >
    >
    >
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2000-12-29 21:41
    I do not know of a way to include a file in this verison of the editor.
    Constants never take any variable space. The programmer simply replaces them
    in your code. For example:


    test1 con 8
    debug dec test1

    is the same code after being downloaded as

    debug dec 8

    Hope that helps.

    Michael Hendricks

    Original Message
    From: "Mike Turco" <miketurco@y...>
    To: <basicstamps@egroups.com>
    Sent: Friday, December 29, 2000 4:11 PM
    Subject: [noparse][[/noparse]basicstamps] Stamp Editor V1.096 compiler questions


    >
    > Two questions:
    >
    > 1) Is there a way to include a text file or something like that in my
    > program? I'd like to have an "include" file with common routines,
    > constants, etc.
    >
    > 2) If I put constants in my program and those constants aren't used,
    > does it take up any memory in the stamp? For example, lets say I want
    > to list out many different baud rates in the program, as follows:
    >
    > baud8n1-24kinv con 1234
    > baud8n1-49kinv con 2345
    > baud8n1-96inv con 16624
    >
    > Thanks,
    >
    > Mike
    >
    >
    >
    >
    >
    >
    >
    >
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2000-12-30 08:45
    >1) Is there a way to include a text file or something like that in my
    >program? I'd like to have an "include" file with common routines,
    >constants, etc.

    Do send the request to Jeff Martin at Parallax. That is also near
    the top of my wish list for BS2sx/e/p programming.!


    >2) If I put constants in my program and those constants aren't used,
    >does it take up any memory in the stamp? For example, lets say I want
    >to list out many different baud rates in the program, as follows:
    >
    >baud8n1-24kinv con 1234
    >baud8n1-49kinv con 2345
    >baud8n1-96inv con 16624

    No, they only take up space only when they are used in the program.


    -- Tracy Allen
    electronically monitored ecosystems
  • ArchiverArchiver Posts: 46,084
    edited 2001-01-03 02:00
    Yep, I can second that one. This would be VERY handy for BS2SX code blocks.
    The order of declarations in each block is extremely important and in may
    cases you want to share variable space. But I don't think it's available
    because there is no support for a source code preprocessor. Well, maybe next
    time around.
    JS

    >
    Original Message
    > From: Tracy Allen [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=4XoqthS7bZUd8BKF_a_Pk5rojBXFooiw2XeVn9tu_wlRzgfVuqQMsAIAE3QLWt1_XedV_SbR9fricT8zgQ]tracy@e...[/url
    > Sent: Saturday, December 30, 2000 12:45 AM
    > To: basicstamps@egroups.com
    > Subject: Re: [noparse][[/noparse]basicstamps] Stamp Editor V1.096 compiler questions
    >
    >
    > >1) Is there a way to include a text file or something like that in my
    > >program? I'd like to have an "include" file with common routines,
    > >constants, etc.
    >
    > Do send the request to Jeff Martin at Parallax. That is also near
    > the top of my wish list for BS2sx/e/p programming.!
    >
    >
    > >2) If I put constants in my program and those constants aren't used,
    > >does it take up any memory in the stamp? For example, lets say I want
    > >to list out many different baud rates in the program, as follows:
    > >
    > >baud8n1-24kinv con 1234
    > >baud8n1-49kinv con 2345
    > >baud8n1-96inv con 16624
    >
    > No, they only take up space only when they are used in the program.
    >
    >
    > -- Tracy Allen
    > electronically monitored ecosystems
    >
    >
    >
    >
Sign In or Register to comment.