parallaxinc / PropellerIDE

An easy-to-use, cross-platform IDE for the Parallax Propeller
GNU General Public License v3.0
70 stars 26 forks source link

bstc compiler in PropellerIDE can't compile CON with negative #Expression #45

Closed dgately closed 7 years ago

dgately commented 8 years ago

While compiling JonnyMac's string parsing example from the Parallax forum (see: ) (downloaded project example file is: jm_parse_fields - Archive [Date 2016), an error occurs with PropellerIDE's included bstc compiler...

The code: `con

-1, ON, OFF ' digital control

0, LSBFIRST, MSBFIRST`

Image of PropellerIDE's error window:

error1

The constant "#-1,..." is failing as it appears bstc does not accept the '-' char.

The workaround is to place "()" around the negative value: `con

(-1), ON, OFF ' digital control`

The above workaround is not needed for openspin or Parallax's original spin compiler...

dgately commented 8 years ago

Hmm... The "" surrounding the CON expression was meant to bold the "-1" and "(-1)". Not sure why the issue editor did not work... I was able to edit-out the ""'s :-)

dgately commented 8 years ago

Code example attachment: jm_parse_fields - Archive [Date 2016.08.23 Time 20.15].zip

bweir commented 8 years ago

Unfortunately, there isn't anything I can do about problems with bstc. =\