Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I add a number and string in a variable on Progress4GL

How can I add a number and string into a character variable on Progress4GL like the following (it's just an example to show the idea).

a = 'Code'
b = 1

c = a+b

So c's value is "Code1"

How can I do it on progress4GL?

Any help is appreciated.

like image 212
Kyle Avatar asked Oct 16 '25 12:10

Kyle


1 Answers

You can use STRING() function to convert integer into character.

With your exemple:

DEFINE VARIABLE a AS CHARACTER  NO-UNDO.
DEFINE VARIABLE b AS INTEGER    NO-UNDO.
DEFINE VARIABLE c AS CHARACTER  NO-UNDO.
a = 'Code'.
b = 1.

c = a + STRING(b).
like image 146
doydoy44 Avatar answered Oct 19 '25 13:10

doydoy44