Kyle
Kyle

Reputation: 1578

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.

Upvotes: 4

Views: 3350

Answers (1)

doydoy44
doydoy44

Reputation: 5772

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).

Upvotes: 5

Related Questions