Format option of STRING function is not yet supported. Unable to evaluate &IF condition

Project:Proparse Project
Component:Code
Category:bug report
Priority:minor
Assigned:Unassigned
Status:active
Description

Simple test:

&IF STRING( 0, "9" ) > "" &THEN &ELSEIF

Use case:

We use a preprocessor that contains a 'normalized' proversion for simple compile time branches based on Progress version.


&GLOBAL-DEFINE PROVERSION-MAJOR (STRING(INTEGER(ENTRY(1, PROVERSION, ".":U)), "99":U))
&GLOBAL-DEFINE PROVERSION-MINOR (ENTRY(2, PROVERSION, ".":U))
&GLOBAL-DEFINE PROVERSION ({&PROVERSION-MAJOR} + ".":U + {&PROVERSION-MINOR})

&IF {&PROVERSION} > "10.1A" &THEN UseOE10Feature &ENDIF

Work-around:


&IF INTEGER( ENTRY( 1, PROVERSION, ".":U ) ) < 10 &THEN
&GLOBAL-DEFINE PROVERSION-ZERO 0
&ENDIF
&GLOBAL-DEFINE PROVERSION-MAJOR ( "{&PROVERSION-ZERO}":U + ENTRY (1, PROVERSION, ".":U ) )
&GLOBAL-DEFINE PROVERSION-MINOR (ENTRY(2, PROVERSION, ".":U))
&GLOBAL-DEFINE PROVERSION ({&PROVERSION-MAJOR} + ".":U + {&PROVERSION-MINOR})


Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
john's picture

Re: Format option of STRING function is not yet supported.

Hi Stefan, thank you for the very well written issue report.

If anybody has some starting point for the algorithm for implementing this, please let me know. In Proparse, it has to be implemented in C++ but that doesn't matter - an algorithm in abl or any other language would help.