EnableASM (without ASM) in the C-backend - Problem with constants

Just starting out? Need help? Post your questions and find answers here.
User avatar
STARGÅTE
Addict
Addict
Posts: 2089
Joined: Thu Jan 10, 2008 1:30 pm
Location: Germany, Glienicke
Contact:

EnableASM (without ASM) in the C-backend - Problem with constants

Post by STARGÅTE »

Dear all,

in some codes I define EnableASM at the beginning even if I did not use Inline-ASM.
Now, I can't compile this simple code due to an error:
(PB 6.00 Alpha 3, C-backend)

Code: Select all

EnableASM

#Constant = 9
---------------------------
PureBasic
---------------------------
Line 3: Constant not found: #Constant.
---------------------------
OK
---------------------------
Is the keyword EnableASM only available in the ASM-backend?
I know, I can't use ASM in C-backend, I just ask for the EnableASM keyword.
Otherwise, I have to use a CompilerIf around EnableASM
PB 6.01 ― Win 10, 21H2 ― Ryzen 9 3900X, 32 GB ― NVIDIA GeForce RTX 3080 ― Vivaldi 6.0 ― www.unionbytes.de
Lizard - Script language for symbolic calculations and moreTypeface - Sprite-based font include/module
User avatar
mk-soft
Always Here
Always Here
Posts: 5406
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: EnableASM (without ASM) in the C-backend - Problem with constants

Post by mk-soft »

I thinks its a bug

Code: Select all

EnableASM

DisableASM

#Constant = 9

Debug #Constant
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
User_Russian
Addict
Addict
Posts: 1443
Joined: Wed Nov 12, 2008 5:01 pm
Location: Russia

Re: EnableASM (without ASM) in the C-backend - Problem with constants

Post by User_Russian »

juergenkulow
Enthusiast
Enthusiast
Posts: 556
Joined: Wed Sep 25, 2019 10:18 am

Re: EnableASM (without ASM) in the C-backend - Problem with constants

Post by juergenkulow »

Code: Select all

; EnableAsm in C Backend 
EnableASM ; Allows some Preprocessor C Code. 
CompilerIf #PB_Backend_C=#PB_Compiler_Backend
  #define   v_w 4711
CompilerEndIf 
Debug w
;4711
Post Reply