Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support upcomming e4thcom features #ifdef and #ifndef in codeload.py #392

Closed
TG9541 opened this issue Jan 17, 2021 · 1 comment
Closed
Assignees

Comments

@TG9541
Copy link
Owner

TG9541 commented Jan 17, 2021

The upcoming e4thcom version supports conditional transfer code after #ifdef name, e.g.

\ example: skip the rest of the file if test is defined
#ifdef test \\

\ example define test unless it's defined
#ifndef test : test ;

\ example: load PD_DDR unless it's defined
#ifndef PD_DDR \res MCU: STM8S103
#ifndef PD_DDR \res export PD_DDR

The change will be added to codeload3.py (update to Python3 in #390) and the new version will be the new default. The Python2.7 version will be preserved as codeload2.py.

@TG9541
Copy link
Owner Author

TG9541 commented Jan 18, 2021

The following rules apply:

  • the conditionals #ifdef <name> or #ifndef <name> have to be the first word on a line
  • ordinary STM8 eForth console input may follow a conditional
  • #require, #include, \res or \\ may follow a conditional and have to be the first word on a line in all other cases

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant