It is currently Sat Jul 20, 2019 12:18 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: "read" in Macros
PostPosted: Mon Jun 03, 2019 5:25 am 
Offline
Enthusiast
Enthusiast

Joined: Mon Jun 23, 2014 1:18 pm
Posts: 103
I have this macro:
Code:
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?


Top
 Profile  
Reply with quote  
 Post subject: Re: "read" in Macros
PostPosted: Mon Jun 03, 2019 5:30 am 
Offline
Enthusiast
Enthusiast

Joined: Mon Jun 23, 2014 1:18 pm
Posts: 103
At the moment I do this:
Code:
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: "read" in Macros
PostPosted: Mon Jun 03, 2019 6:29 am 
Offline
Addict
Addict
User avatar

Joined: Thu Jan 10, 2008 1:30 pm
Posts: 1205
Location: Germany, Glienicke
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.

_________________
ImageImage


Top
 Profile  
Reply with quote  
 Post subject: Re: "read" in Macros
PostPosted: Mon Jun 03, 2019 6:41 am 
Offline
Addict
Addict

Joined: Thu Aug 30, 2007 11:54 pm
Posts: 1008
Location: right here
Ugly, but here it is :) :
Code:
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


Top
 Profile  
Reply with quote  
 Post subject: Re: "read" in Macros
PostPosted: Mon Jun 03, 2019 7:57 am 
Offline
Enthusiast
Enthusiast

Joined: Mon Jun 23, 2014 1:18 pm
Posts: 103
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 :-)


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 14 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye