Go to Post At the end of the day, and this is where many may disagree, it's about what is learnt and not about who wins. - popnbrown [more]
Home
Go Back   Chief Delphi > Old Forum Archives > 2001
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #8   Spotlight this post!  
Unread 24-06-2002, 02:26
archiver archiver is offline
Forum Archival System
#0047 (ChiefDelphi)
 
Join Date: May 2001
Location: Pontiac, MI
Posts: 21,214
archiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond repute
Just a few nits (not ninnies) to pick

Posted by Gregory Ross at 03/19/2001 1:28 PM EST


Engineer on team #330, Beach Bots, from Hope Chapel Academy and NASA/JPL.


In Reply to: YES
Posted by Stephen on 03/18/2001 8:58 PM EST:



I hate it when my kids get nit-picky, but I guess they come by it honestly ;-)

Steven,

Actually, constants don't need to be defined in every program (unless, of course, they are used in multiple programs) since they take up no variable space.

...and Gui,
It's true that the variable data stays in memory between programs, but one program has no idea of variables defined in another program, or how much variable space is used by other programs unless you tell it (by defining all variables in all programs.)

Also, defining variables takes up no PROGRAM space (EEPROM) only VARIABLE space (RAM). (I realize that may have been what you meant when you wrote "program space" -- Just wanted to be sure all those nasty little nits were gone :-)

Of course, since variable space is so much more limited (26 bytes) than program space(64Kytes per program), then conserving variable space may be of much greater concern.

Maybe an example would be helpful: Consider the case where you have one program that fills 10 byte variables, and another program that sums those ten bytes and stores the result into a word variable.

If the first program only defined the 10 bytes, then since the interpreter puts word variables first in memory, the word variable defined in the second program would overlay the first two byte variables from the first, and the summation would be of the last eight bytes and two undefined bytes!


__________________
This message was archived from an earlier forum system. Some information may have been left out. Start new discussion in the current forums, and refer back to these threads when necessary.
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
2-week FIRST summer program @ WPI ColleenShaver General Forum 20 31-05-2009 03:02
initialization program and speed controllers rosebud Programming 15 05-10-2004 03:35
Fried program slots? Jeff Waegelin Programming 18 19-03-2003 18:08
Credits for FIRST program. archiver 2000 6 24-06-2002 00:16
An invitation for HS Juniors archiver 2000 0 23-06-2002 22:51


All times are GMT -5. The time now is 09:24.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi