Exact match. Not showing close matches.
PICList
Thread
'[SX] SX/B 2.00.28 Beta now supports nested Conditi'
2009\07\13@054323
by
beann/a
|
|
I can't remember who asked for this feature...I think is was Peter ???
But I have implemented it, so I'd like you guys to give it a good test case.
Here is what I used to test it:
DEVICE SX28, OSC4MHZ
FREQ 4_000_000
temp1 VAR BYTE
PROGRAM Start NOSTARTUP
Start:
' This three defines TEST0, TEST1 and TEST2 determine which of the seven FOR statements are compiled
'{$UNDEFINE TEST2}
'{$DEFINE TEST1}
'{$DEFINE TEST0}
'{$IFNDEF TEST2}
'{$IFNDEF TEST1}
'{$IFNDEF TEST0}
FOR temp1 = 0 TO 255
'{$ELSE}
FOR temp1 = 1 TO 255
'{$ENDIF}
'{$ELSE}
'{$IFNDEF TEST0}
FOR temp1 = 2 TO 255
'{$ELSE}
FOR temp1 = 3 TO 255
'{$ENDIF}
'{$ENDIF}
'{$ELSE}
'{$IFNDEF TEST1}
'{$IFNDEF TEST0}
FOR temp1 = 4 TO 255
'{$ELSE}
FOR temp1 = 5 TO 255
'{$ENDIF}
'{$ELSE}
'{$IFNDEF TEST0}
FOR temp1 = 6 TO 255
'{$ELSE}
FOR temp1 = 7 TO 255
'{$ENDIF}
'{$ENDIF}
'{$ENDIF}
NEXT
END
2009\07\13@055718 by RS_Jimn/a
|
|
Thanks Bean,
I will download and install later today! I recently was trying to do some stuff where nested compiler directives would have been very nice!
RS_JIM
---------- End of Message ----------
You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=367635#m367642
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2009 (http://www.dotNetBB.com)
2009\07\13@103703 by peterverkaikn/a
|
|
Bean,
Nested conditionals were already possible, but the condition was reset upon first $endif.
I assume that is no longer the case and we have truly nested conditionals now.
regards peter
---------- End of Message ----------
You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=367635#m367702
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2009 (http://www.dotNetBB.com)
|
|
Peter,
Yes, they should be honest and truly nest-able now.
The example program I show above will only generate a single FOR line depending on if TEST0, TEST1 and TEST2 are defined or undefined.
Let me know if you get a chance to test it.
Bean.
---------- End of Message ----------
You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=367635#m367704
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2009 (http://www.dotNetBB.com)
|
|
Just wondering if anyone has had a chance to test 2.00.28 yet ?
Bean.
---------- End of Message ----------
You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=367635#m367859
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2009 (http://www.dotNetBB.com)
2009\07\14@081211 by RS_Jimn/a
|
|
Haven't tested all of the features, but it has worked perfectly on everything I done with it so far.
RS_JIM
---------- End of Message ----------
You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=367635#m367896
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2009 (http://www.dotNetBB.com)
2009\07\14@104954 by CounterRotatingPropsn/a
|
|
Thanks Bean - nice improvement!
I'll try it out over the next weeks.
- Howard
---------- End of Message ----------
You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=367635#m367938
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2009 (http://www.dotNetBB.com)
2009\07\24@214024 by RS_Jimn/a
|
|
@Bean,
The following does not compile correctly:
' -------------------------------------------------------------------------
' Conditional Compilation Symbols
' -------------------------------------------------------------------------
'{$DEFINE SERIAL}
'
'
' -------------------------------------------------------------------------
' INTERRUPT
' -------------------------------------------------------------------------
' -------------------------------------------------------------------------
'{$IFDEF SERIAL}
INTERRUPT NOPRESERVE 230_400
'{$ELSE}
INTERRUPT NOPRESERVE 100_000
'{$ENDIF}
' -------------------------------------------------------------------------
All of my other conditionals compile correctly including a nested one
'{$IFDEF SERIAL}
'{$IFDEF LCD_DSP}
'{$ELSE }
'{$ENDIF}
IT Tries to use both interupt rates and the assemblier complains about overwriting the same program location. I can also tell from the __INTOPTION that it is picking up the second value (10,000) as it equats __INTOPTION to $80 not $88. If I don't use the conditional and just comment out the interupt option I don't want, it compiles/assembles correctly. I have conditionals burried in the interupt load file and that is working correctly.
RS_JIM
'{$ENDIF}
---------- End of Message ----------
You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=367635#m370876
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2009 (http://www.dotNetBB.com)
|
|
Jim,
Could you post the entire program.
I tried this and it seem to work properly.
Bean.
---------- End of Message ----------
You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=367635#m370927
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2009 (http://www.dotNetBB.com)
2009\07\26@063109 by RS_Jimn/a
|
|
@Bean
Thanks for checking. Problem was with a redundant declaration of the program ID!
RS_JIM
---------- End of Message ----------
You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=367635#m371087
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2009 (http://www.dotNetBB.com)
|
|
I'm having frustrating trouble with the conditional compile directives while porting our BS2px code to SX28AC with SX/B (need speed and interrupts).
I find it very confusing and odd that the syntax for these directives starts with the ' comment delimiter. Does that mean these lines can't be commented-out?? Using '' <-- that's two ' does not seem to work; the conditional compile is taken regardless. And, I must admit that I'm curious about the reason for implementing these this way.
example:
'{$DEFINE Bluetooth} 'compile Bluetooth code if defined (true)
''{$DEFINE COMport} 'compile serial port I/O if defined (true)
'{$DEFINE EnFilter} 'enable digital filtering of sample data
''{$DEFINE DebugMode} 'compile debug statements if defined (true)
''{$DEFINE DualAxis}
I could see changing DEFINE to unDEFINE, but it gets more difficult if I want to comment out the IFDEF...ELSE...ENDIF's
Got any helpful guidance?
-- BrooksL
---------- End of Message ----------
You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=367635#m402468
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2009 (http://www.dotNetBB.com)
2009\11\19@112738 by BrooksLn/a
|
|
Bean asked "...if anyone has had a chance to test 2.00.28 yet ?"
What does that version number refer to? SX/B compiler version?
Is SX/B 1.51.03 no longer the latest?
--BrooksL
---------- End of Message ----------
You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=367635#m402475
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2009 (http://www.dotNetBB.com)
2009\11\19@154126 by JonnyMacn/a
|
|
Brooks,
We moved past 1.5x a long time ago -- but you have to install it manually (the IDE installer hasn't been updated with the 2.x files). You can find what you need in a sticky post at the top of the SX forum.
---------- End of Message ----------
You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=367635#m402554
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2009 (http://www.dotNetBB.com)
2009\11\19@162905 by BrooksLn/a
|
|
Thanks Jonny; where do I get the current SX/B compiler - AND documentation? I only saw 1.51 on the Parallax SX web page.
I use conditional compile directives a lot for feature options. This ' comment delimter in the SX/B directive syntax is creating an annoyance for the porting of other code. ...and I can forsee it causing possible future difficulty.
Today for example, I finally spotted '{$IF ... } instead of '{$IFDEF ... } and '{$IF ... } appears as a comment to the SX/B compiler so it fails to generate a syntax error!? That took hours to notice - as will any others that get in there!
-- Brooks
---------- End of Message ----------
You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=367635#m402573
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2009 (http://www.dotNetBB.com)
2009\11\19@180348 by PJ Allenn/a
|
|
It's hiding here at the top of the SX Forum --
http://forums.parallax.com/forums/default.aspx?f=7&m=323767
---------- End of Message ----------
You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=367635#m402587
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2009 (http://www.dotNetBB.com)
2009\11\19@183011 by PJMontyn/a
|
|
The IDE hasn't been updated because S/B is still in Beta. When SX/B comes out of Beta, then the IDE will be updated.
Thanks,
PeterM
---------- End of Message ----------
You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=367635#m402588
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2009 (http://www.dotNetBB.com)
2009\11\19@190943 by BrooksLn/a
|
|
JohnnMac suggested:
' {$DEFINE DEBUGGING}
...and when I want it off I change it to:
' {$DEFINE DEBUGGING_OFF}
---
The confusion comes in that with the ' comment delimiter, you can change it to just about anything:
'{$DEFINE DEBUGGING_OFF} or
'{$UNDEFINE DEBUGGING} or
'{$NODEFINE DEBUGGING} or
'{$STOPDEF DEBUGGING} or
'{$DEF DEBUGGING} ....
All but the first has the same effect and the compiler won't check or enforce a standard syntax with error messages - because they look like comments. :-/ More dangerous; what if you have a define (or any) directive like '{$DEFINE DEBUGGING} or {$DEFINE DEBUGGING} floating somewhere in a real 'comment statement - wil lthe compiler process it as a valid directive??
...Since SX/B 2.x is in beta... can this ' issue be "fixed" before release? - not just because it's bugging me right now (obviously, I'll have to work around it for the time being), but because there seems to be a lot of potential problems with it.
-- BrooksL
---------- End of Message ----------
You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=367635#m402592
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2009 (http://www.dotNetBB.com)
|
|
[Quoting: "BrooksL"]More dangerous; what if you have a define (or any) directive like '{$DEFINE DEBUGGING} or {$DEFINE DEBUGGING} floating somewhere in a real 'comment statement - wil lthe compiler process it as a valid directive??
'{$DEFINE XYZ}
above means XYZ is defined (true)
''{$DEFINE XYZ}
not defined
' { $DEFINE XYZ}
not defined etc.
Not sure what the issue is? Rather then even "undefining" I would just comment out the define, e.g.
'{$DEFINE debugging}
'{$IFDEF debugging}
'lots of code that will compile
'{$ENDIF}
''{$DEFINE debugging}
'{$IFDEF debugging}
'lots of code that will NOT compile
'{$ENDIF}
2009\11\19@210108 by JonnyMacn/a
|
|
No language is perfect, and considering what you paid for SX/B ---------- End of Message ----------
You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=367635#m402616
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2009 (http://www.dotNetBB.com)
2009\11\19@210915 by JonnyMacn/a
|
|
I stand corrected; thanks Zoot; I will "comment out" future directives when needed.
---------- End of Message ----------
You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=367635#m402618
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2009 (http://www.dotNetBB.com)
2009\11\19@214809 by BrooksLn/a
|
|
Thanks, Zoot. my initial assesment was clouded by having '{IF ... } instead of '{IFDEF ... } and not having the compiler catch it as a syntax error - because it looks like a 'comment due to the ' - my tests of '{DEFINE ... } and ''{DEFINE ... } both appeared to have the effect of making the variable true.
Thanks for listening. And, it sure would be nice if conditional compile directives were recognized as regular keyword syntax...
---------- End of Message ----------
You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=367635#m402621
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2009 (http://www.dotNetBB.com)
|
|
Newbie question: is there a way to use the virtual peripherals with SX/BASIC?
I'm hoping the answer is yes and that there's some guidance somewhere, but it's not obvious because I couldn't find an affirm or decline nor any mention in the SX/B manual.
-- BrooksL
---------- End of Message ----------
You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=367635#m412625
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2009 (http://www.dotNetBB.com)
2009\12\23@190935 by JonnyMacn/a
|
|
@BrooksL: It's bad form to change the topic of a thread mid-stream. Start a new thread with an appropriate subject line. BTW... the answer is "Yes" -- get guidance by starting another thread.
---------- End of Message ----------
You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=367635#m412666
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2009 (http://www.dotNetBB.com)
2009\12\24@013029 by BrooksLn/a
|
|
JonnyMac; oops, lost track of where I was posting; thought it was to the FAQ thread, but I'll start a new one.
-- BrooksL
---------- End of Message ----------
You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=367635#m412721
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2009 (http://www.dotNetBB.com)
More... (looser matching)
- Last day of these posts
- In 2009
, 2010 only
- Today
- New search...