Thread: PBasic Variable
View Single Post
  #2   Spotlight this post!  
Unread 14-01-2002, 15:41
Joe Johnson's Avatar Unsung FIRST Hero
Joe Johnson Joe Johnson is offline
Engineer at Medrobotics
AKA: Dr. Joe
FRC #0088 (TJ2)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1996
Location: Raynham, MA
Posts: 2,648
Joe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond repute
Stop it you're scaring me!

What I am pretty sure about is that the physical RAM space is the same from slot to slot.

The problem is that your declarations really are just aliases for the the real RAM space.

If your declarations don't match, then the alias is pointing to a differen place in RAM.

This can really screw you up because a variable called Dog may actual be changing the variable you have been calling Cat in another program slot. This is a doubly bad event because Dog did not get the value you wanted AND Cat's value is trashed as well.

Bottom line:

Take pains to make sure your declarations match from program slot to programs slot.

Joe J.