forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

mixing /undef and /debug with inline directives

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
KennyT



Joined: 02 Aug 2005
Posts: 247

PostPosted: Thu Aug 24, 2017 3:02 pm    Post subject: mixing /undef and /debug with inline directives Reply with quote

We have a line of code which works under /debug but flags an error under /undef or /check. we know it's not "kosher", but it is very useful!

loc(DQ) = IADD

so, is there a way to temporarily switch to /debug and then back to /undef with an embedded directive?

K
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 4919
Location: Salford, UK

PostPosted: Thu Aug 24, 2017 6:09 pm    Post subject: Reply with quote

You can use an OPTIONS directive between program units. Search for "OPTIONS directive" in the help file.
Back to top
View user's profile Send private message
KennyT



Joined: 02 Aug 2005
Posts: 247

PostPosted: Thu Aug 24, 2017 8:37 pm    Post subject: Reply with quote

Thanks Paul,

i aassume we can combine that with some #ifdefs to only invoke the calls to "options (debug)" if the main compilation switch is /undef?

K
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 4919
Location: Salford, UK

PostPosted: Fri Aug 25, 2017 8:46 am    Post subject: Reply with quote

Kenny

I expect that you can.
Back to top
View user's profile Send private message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 1652
Location: Yateley, Hants, UK

PostPosted: Fri Aug 25, 2017 9:45 am    Post subject: Reply with quote

So come on, Kenny - what's so 'very useful' about it? Educate us (well, me). I didn't know you could put a function on the LHS of an assignment.

(I've liked the word 'kosher' in this context since seeing it transcribed by an Irish secretary from dictation as 'cauchre' - which puzzled everyone until the witness statement was read aloud!)

Eddie
Back to top
View user's profile Send private message
KennyT



Joined: 02 Aug 2005
Posts: 247

PostPosted: Fri Aug 25, 2017 10:24 am    Post subject: Reply with quote

aah - i could tell you but then i'd have to shoot you!

In our application we have structures, variables and their addresses. For historical reasons (the GUI code predates the use of pointers and structures), we don't want to pass the POINTER to the structure, but we want to set its address so that we can pass it to the GUI subroutines.

loc(DQ) = IADD

does just that!

i think it only works with LOC and is probably of no use to anyone writing code from scratch, but very useful for us as it saved re-writing huge chunks of code!

K
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group