[futurebasic] Re: [FB] Register variables

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : January 2001 : Group Archive : Group : All Groups

From: Alain Pastor <apastor@...>
Date: Tue, 09 Jan 2001 18:45:22 +0100

"Wolf, John" wrote:

> Are register variables assigned to globals?
> Just to be safe, I have been doing something like:
> register off
> dim gWhaterver&, gThisToo%
> end globals
> register on
> -rest of program-
> John.

Hi John,

I don't think the global variables are placed into registers, they need to
have an address in memory.

Try the following piece of code with the Debugger on.

begin globals
dim gWhaterver&, gThisToo%
end globals
local fn test
dim as long a,b,c,d,e,f,g,h,i,j,k,l,m,n
end fn
fn test
until fn button

the Debugger indicates which of the variables go into a register, you will
notice that none of the global variables is placed into a register although
defined first.