It is currently Mon Jun 26, 2017 3:19 pm

Welcome to rfobasic

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. In addition, registered members also see less advertisements. Registration is fast, simple, and absolutely free, so please, join our community today. **You are not required to provide truthful information to any registration questions. Be whomever you wish to be.!

Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Interrupt Labels section
Unread postPosted: Mon Dec 12, 2016 3:47 am 

Joined: Wed Feb 20, 2013 3:25 pm
Posts: 423
Location: Italy

In the "Interrupt Labels (Event Handlers)" section I'd suggest to add the following note.

Interrupt routines are always executed in the global variable scope.
If a variable name used in an interrupt routine is not defined in the global scope, then, considering the current function invocation stack, such variable refers to the variable instance of the function scope closest to the global scope (i.e. deepest in the invocation stack) where the variable is first defined.
It is recommended not to invoke user-defined functions inside interrupt routines to avoid variable namespace clashes.
In case a user-defined function must absolutely be invoked, it is recommended to create a special version of such function which uses original variable names, i.e. names which are not and shall never be used either in the global namespace or in the namespace of any other user-defined function.


 Post subject: Re: Interrupt Labels section
Unread postPosted: Mon Dec 12, 2016 3:57 am 
User avatar

Joined: Tue Jan 03, 2012 9:31 am
Posts: 5541
Location: Paris, France
Marc, see these 2 posts for reference, with snippets showing the behavior:


- Creator of the Android BASIC! Compiler

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 0 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: