How do you define a string in Progress 4gl?
progress-4gl Strings String manipulation
- STRING – converts any value to a string.
- CHR and ASC – converts single characters to and from ascii.
- LENGTH – returns the length of a string.
- SUBSTRING – returns or assigns a part of a string.
- INDEX – return the position of a string in a string.
How do I reverse a string in Progress 4gl?
Is there any reverse string function built-in with progress 4gl? FUNCTION reverseString RETURNS CHARACTER ( INPUT i_c AS CHARACTER ): DEFINE VARIABLE cresult AS CHARACTER NO-UNDO. DEFINE VARIABLE ii AS INTEGER NO-UNDO. DO ii = LENGTH( i_c ) TO 1 BY -1: cresult = cresult + SUBSTRING( i_c, ii, 1 ).
What is no-undo in Progress 4gl?
No-undo removes undo handling. This is usually the default preferred behavior unless you need temp-tables, variables etc to utilize undo-handling. A very basic example below. Unless you really need undo handling it better be avoided.
How to write special characters in Progress 4GL?
In Progress 4GL the normal way to write a special character is to preceed it with a tilde character (~). Used to write ” inside strings defined using “string”. Used to write ‘ inside strings defined using ‘string’.
How do I put a value into a date in progress?
How do I put that value into a date in Progress? def var xx as char. def var xq as date. ASSIGN xx = ‘2016’ xq = DATE (01/01/xx). Show activity on this post.
How do I change the first 5 chars in a string?
The STRINGfunction parameter is intended only to format the output string to a desired pattern, not to replace chars on it “on the fly”. You’ll need a CHARvariable to put the database value on it and you can use the OVERLAYor SUBSTRINGfunction to override the first five chars on your string to match your criteria. In your example :