Just starting out? Need help? Post your questions and find answers here.
-
Cyllceaux
- Enthusiast
- Posts: 469
- Joined: Mon Jun 23, 2014 1:18 pm
-
Contact:
Post
by Cyllceaux »
I have this macro:
Code: Select all
Structure strProject
EndStructure
Macro DeclareCRUD(Objekt)
Declare.b create#Objekt(*objekt.str#Objekt)
Declare read#Objekt(nr.q)
Declare.b update#Objekt(*objekt.str#Objekt)
Declare.b delete#Objekt(nr.q)
EndMacro
DeclareCRUD(Project)
My Problem is the Line with the "Read". It is always change "read" to Uppercase "Read". I know it is a reserved word. But what can I do?
-
Cyllceaux
- Enthusiast
- Posts: 469
- Joined: Mon Jun 23, 2014 1:18 pm
-
Contact:
Post
by Cyllceaux »
At the moment I do this:
Code: Select all
Macro DeclareCRUD(Objekt)
Declare.b _create#Objekt(*objekt.str#Objekt)
Declare _read#Objekt(nr.q)
Declare.b _update#Objekt(*objekt.str#Objekt)
Declare.b _delete#Objekt(nr.q)
EndMacro
But for a DLL it doesn't look good.
-
STARGÅTE
- Addict
- Posts: 2090
- Joined: Thu Jan 10, 2008 1:30 pm
- Location: Germany, Glienicke
-
Contact:
Post
by STARGÅTE »
Why do you claim the behavior as a bug?
As you wrote, Read is a reserved keyword.
You can disable the case correction in the preferences.
-
#NULL
- Addict
- Posts: 1440
- Joined: Thu Aug 30, 2007 11:54 pm
- Location: right here
Post
by #NULL »
Ugly, but here it is
:
Code: Select all
Structure strProject
EndStructure
Macro DeclareCRUD_re :re: EndMacro
Macro DeclareCRUD_ad :ad: EndMacro
Macro DeclareCRUD(Objekt)
Declare.b create#Objekt(*objekt.str#Objekt)
Declare DeclareCRUD_re#DeclareCRUD_ad#Objekt(nr.q)
Declare.b update#Objekt(*objekt.str#Objekt)
Declare.b delete#Objekt(nr.q)
EndMacro
DeclareCRUD(Project)
If Defined(updateProject, #PB_Procedure)
Debug "defined"
EndIf
-
Cyllceaux
- Enthusiast
- Posts: 469
- Joined: Mon Jun 23, 2014 1:18 pm
-
Contact:
Post
by Cyllceaux »
Ugly is not the perfect word.. but it's what I'm looking for. thx
If it's not a bug, this topic can move to tips/tricks