4GL question
Posted in 2000
I'm wanting to write a somewhat generic 4gl function that will return a character string that could anywhere from 1 to 64 characters. I want to pass the number of characters in the resulting string to the function. It's use would be something like the following: MAIN DEFINE result2 CHAR(2), result4 CHAR(4), result8 CHAR(8), result16 CHAR(16) CALL some_function(2) RETURNING result2 CALL some_function(4) RETURNING result4 CALL some_function(8) RETURNING result8 CALL some_function(16) RETURNING result16 END MAIN FUNCTION some_function(nchar) DEFINE nchar SMALLINT, result CHAR(64) .......some code.... RETURN result[1,nchar] END FUNCTION Do you see any problem with this or know of a better way to return a variable length string? Thanks in advance! Candy -- Candy McCall ONLINE Computing, Inc. (candym@olcinc.com)