is Keyword now irrelevant ?

Posted by jmls on 07-May-2014 14:18

for some time I used to use the keyword() function in preprocessor &IF statements to check if certain features were present while compiling.

However, I tried to use this today for checking for Json Object support. Much to my initial surprise, all the json support "keywords" came back as ? , even under 11

Thinking about it, I realised that these aren't keywords. They are new progress classes (much like AppError) and don;t show on the keyword() hit list

Does this mean that keyword is actually becoming useless and should be marked as deprecated ? If more and more language features are being implemented as classes then the keyword function becomes less and less relative

I know that I could use the proversion function in the preprocessor, but I didn't want to have to remember which version of progress a particular feature was implemented

while I'm at it, is there a quick way of checking at compile time using preprocessors if the running version is > 10.2B ?

All Replies

Posted by Mike Fechner on 07-May-2014 14:23

This is what I use to test for 10.2A and above:
 
&IF NOT PROVERSION GE "4" AND PROVERSION GE "10.2A" &THEN
&GLOBAL-DEFINE winkitactive
&ENDIF
 
Not nice – but works.
 
 
Von: jmls [mailto:bounce-jmls@community.progress.com]
Gesendet: Mittwoch, 7. Mai 2014 21:20
An: TU.OE.Development@community.progress.com
Betreff: is Keyword now irrelevant ?
 
Thread created by jmls

for some time I used to use the keyword() function in preprocessor &IF statements to check if certain features were present while compiling.

However, I tried to use this today for checking for Json Object support. Much to my initial surprise, all the json support "keywords" came back as ? , even under 11

Thinking about it, I realised that these aren't keywords. They are new progress classes (much like AppError) and don;t show on the keyword() hit list

Does this mean that keyword is actually becoming useless and should be marked as deprecated ? If more and more language features are being implemented as classes then the keyword function becomes less and less relative

I know that I could use the proversion function in the preprocessor, but I didn't want to have to remember which version of progress a particular feature was implemented

while I'm at it, is there a quick way of checking at compile time using preprocessors if the running version is > 10.2B ?

Stop receiving emails on this subject.

Flag this post as spam/abuse.

Posted by jmls on 07-May-2014 14:29

thanks Mike. It's .. horrible .. but functional ... so I will have to swallow hard, close my eyes and type it in ...

Posted by Mike Fechner on 07-May-2014 14:32

Hide it in an include file ;-)
 
 
Von: jmls [mailto:bounce-jmls@community.progress.com]
Gesendet: Mittwoch, 7. Mai 2014 21:30
An: TU.OE.Development@community.progress.com
Betreff: RE: is Keyword now irrelevant ?
 
Reply by jmls

thanks Mike. It's .. horrible .. but functional ... so I will have to swallow hard, close my eyes and type it in ...

Stop receiving emails on this subject.

Flag this post as spam/abuse.

Posted by jmls on 07-May-2014 14:35

aaarrgggghhhh dear god no. I would *have* to shoot myself before doing anything like that ... :)

Posted by James Palmer on 08-May-2014 03:16

Copy and Paste. Then you don't have to type it ;)

Posted by Marian Edu on 08-May-2014 03:22

checking if progress.lang.class:getclass('progress.json.jsonparser') is
valid doesn't appeal you for some reason?


[collapse]On 05/07/2014 10:19 PM, jmls wrote:
>[collapse] From: jmls
> Post: is Keyword now irrelevant ?
> Posted in: OpenEdge Development
> Link: http://community.progress.com/technicalusers/f/19/t/10029.aspx
>
> for some time I used to use the keyword() function in preprocessor &IF statements to check if certain features were present while compiling.
> However, I tried to use this today for checking for Json Object support. Much to my initial surprise, all the json support "keywords" came back as ? , even under 11
> Thinking about it, I realised that these aren't keywords. They are new progress classes (much like AppError) and don;t show on the keyword() hit list
> Does this mean that keyword is actually becoming useless and should be marked as deprecated ? If more and more language features are being implemented as classes then the keyword function becomes less and less relative
> I know that I could use the proversion function in the preprocessor, but I didn't want to have to remember which version of progress a particular feature was implemented
> while I'm at it, is there a quick way of checking at compile time using preprocessors if the running version is > 10.2B ?
>
>
> --
> You were sent this email because you opted to receive email notifications when someone created a new thread.
>
> To unsubscribe[collapse] from:
> - ...only this thread, disable notifications at http://community.progress.com/technicalusers/f/19/t/10029.aspx.
> - ...all email notifications from Progress Community, navigate to "Settings", click on the "Email" tab, then under the "Email Configuration" section, set Send Notifications to "No".
>
>


--
m.edu
keep it simple
http://www.ganimede.ro
http://ro.linkedin.com/in/marianedu
medu@ganimede.ro
mobile: +40 740 036 212
skype: marian.edu[/collapse][/collapse][/collapse]

Posted by Mike Fechner on 08-May-2014 03:24

progress.lang.class:getclass('progress.json.jsonparser')
 
IMHO that’s only available at runtime. Julian is seeking a compile time solution.
 
Von: Marian Edu [mailto:bounce-medu@community.progress.com]
Gesendet: Donnerstag, 8. Mai 2014 10:24
An: TU.OE.Development@community.progress.com
Betreff: Re: is Keyword now irrelevant ?
 
Reply by Marian Edu
checking if progress.lang.class:getclass('progress.json.jsonparser') is
valid doesn't appeal you for some reason?


[collapse]On 05/07/2014 10:19 PM, jmls wrote:
>[collapse] From: jmls
> Post: is Keyword now irrelevant ?
> Posted in: OpenEdge Development
> Link:
http://community.progress.com/technicalusers/f/19/t/10029.aspx
>
> for some time I used to use the keyword() function in preprocessor &IF statements to check if certain features were present while compiling.
> However, I tried to use this today for checking for Json Object support. Much to my initial surprise, all the json support "keywords" came back as ? , even under 11
> Thinking about it, I realised that these aren't keywords. They are new progress classes (much like AppError) and don;t show on the keyword() hit list
> Does this mean that keyword is actually becoming useless and should be marked as deprecated ? If more and more language features are being implemented as classes then the keyword function becomes less and less relative
> I know that I could use the proversion function in the preprocessor, but I didn't want to have to remember which version of progress a particular feature was implemented
> while I'm at it, is there a quick way of checking at compile time using preprocessors if the running version is > 10.2B ?
>
>
> --
> You were sent this email because you opted to receive email notifications when someone created a new thread.
>
> To unsubscribe[collapse] from:
> - ...only this thread, disable notifications at
http://community.progress.com/technicalusers/f/19/t/10029.aspx.
> - ...all email notifications from Progress Community, navigate to "Settings", click on the "Email" tab, then under the "Email Configuration" section, set Send Notifications to "No".
>
>


--
m.edu
keep it simple
http://www.ganimede.ro
http://ro.linkedin.com/in/marianedu
medu@ganimede.ro
mobile: +40 740 036 212
skype: marian.edu
Stop receiving emails on this subject.

Flag this post as spam/abuse.

[/collapse][/collapse][/collapse]

Posted by jmls on 08-May-2014 03:58

Marian, I need to be able to conditionally compile a unit - so I needed a compile time option

Posted by Peter Judge on 08-May-2014 07:51

You should log a request to add support for class type-availability checks in the list of keywords allowed in &IF expressions (as doc'ed). That might or not solve your problem, depending on how far back  you want to check. You will need to check KEYWORD('class') AND (hypothetically) GET-CLASS(JsonObject).

-- peter

Posted by jmls on 08-May-2014 07:55

it may help for version 12 (and all other versions) going forward - it
won't solve the problem for 10 or 11, even though there may be valid
"keywords" in that particular version that return ?

unless I can convince the powers that be that this is a bug and
service packs for 10 & 11 contain this "missing" functionality ;)

On 8 May 2014 13:52, Peter Judge wrote:
> RE: is Keyword now irrelevant ?
> Reply by Peter Judge
>
> You should log a request to add support for class type-availability checks
> in the list of keywords allowed in &IF expressions (as doc'ed). That might
> or not solve your problem, depending on how far back you want to check. You
> will need to check KEYWORD('class') AND (hypothetically)
> GET-CLASS(JsonObject).
>
> -- peter
>
> Stop receiving emails on this subject.
>
> Flag this post as spam/abuse.



--
Julian Lyndon-Smith
IT Director,
dot.r
http://www.dotr.com

"The bitterness of poor quality remains long after the sweetness of
low price is forgotten”

Follow dot.r on http://twitter.com/DotRlimited

Posted by Mike Fechner on 08-May-2014 07:57

Service packs for Version 10?
10.2B08 is expected to be the final OE10 release.
 
Man, you need very good reasons.
 
 
 
Von: jmls [mailto:bounce-jmls@community.progress.com]
Gesendet: Donnerstag, 8. Mai 2014 14:56
An: TU.OE.Development@community.progress.com
Betreff: Re: is Keyword now irrelevant ?
 
Reply by jmls
it may help for version 12 (and all other versions) going forward - it
won't solve the problem for 10 or 11, even though there may be valid
"keywords" in that particular version that return ?

unless I can convince the powers that be that this is a bug and
service packs for 10 & 11 contain this "missing" functionality ;)

On 8 May 2014 13:52, Peter Judge wrote:
> RE: is Keyword now irrelevant ?
> Reply by Peter Judge
>
> You should log a request to add support for class type-availability checks
> in the list of keywords allowed in &IF expressions (as doc'ed). That might
> or not solve your problem, depending on how far back you want to check. You
> will need to check KEYWORD('class') AND (hypothetically)
> GET-CLASS(JsonObject).
>
> -- peter
>
> Stop receiving emails on this subject.
>
> Flag this post as spam/abuse.



--
Julian Lyndon-Smith
IT Director,
dot.r
http://www.dotr.com

"The bitterness of poor quality remains long after the sweetness of
low price is forgotten”

Follow dot.r on
http://twitter.com/DotRlimited
Stop receiving emails on this subject.

Flag this post as spam/abuse.

Posted by Peter Judge on 08-May-2014 08:01

How far back do you need to check (version-wise)?

Posted by jmls on 08-May-2014 08:05

10.2B is the earliest

On 8 May 2014 13:55, Julian Lyndon-Smith wrote:
> it may help for version 12 (and all other versions) going forward - it
> won't solve the problem for 10 or 11, even though there may be valid
> "keywords" in that particular version that return ?
>
> unless I can convince the powers that be that this is a bug and
> service packs for 10 & 11 contain this "missing" functionality ;)
>
> On 8 May 2014 13:52, Peter Judge wrote:
>> RE: is Keyword now irrelevant ?
>> Reply by Peter Judge
>>
>> You should log a request to add support for class type-availability checks
>> in the list of keywords allowed in &IF expressions (as doc'ed). That might
>> or not solve your problem, depending on how far back you want to check. You
>> will need to check KEYWORD('class') AND (hypothetically)
>> GET-CLASS(JsonObject).
>>
>> -- peter
>>
>> Stop receiving emails on this subject.
>>
>> Flag this post as spam/abuse.
>
>
>
> --
> Julian Lyndon-Smith
> IT Director,
> dot.r
> http://www.dotr.com
>
> "The bitterness of poor quality remains long after the sweetness of
> low price is forgotten”
>
> Follow dot.r on http://twitter.com/DotRlimited



--
Julian Lyndon-Smith
IT Director,
dot.r
http://www.dotr.com

"The bitterness of poor quality remains long after the sweetness of
low price is forgotten”

Follow dot.r on http://twitter.com/DotRlimited

This thread is closed