Extract function return value
Extract function return value
(OP)
What value extract function returns as in this example?
string_val = abcdef
ret_val=extract(string_val,1,7)
As you can see, extract function should give 7 strings long word but parameter is actually 6 strings long. Is it possible that extract func. returns NULL value?
How can I detect with IF statement the NULL value of ret_val parameter.
Something like this:
if (ret_val==NULL)
DO_THIS */ex.
else
DO_THAT */ex.
endif
string_val = abcdef
ret_val=extract(string_val,1,7)
As you can see, extract function should give 7 strings long word but parameter is actually 6 strings long. Is it possible that extract func. returns NULL value?
How can I detect with IF statement the NULL value of ret_val parameter.
Something like this:
if (ret_val==NULL)
DO_THIS */ex.
else
DO_THAT */ex.
endif





RE: Extract function return value
If the length of sring_value is greater than 7, get the first seven characters.
If the length is 7 or less, use string_value as it is.
"Wildfires are dangerous, hard to control, and economically catastrophic."
Ben Loosli
RE: Extract function return value
RE: Extract function return value
ret_val=extract(string_val,1,7)
if (ret_val=='')
result = 'NULL value'
else
result = 'value'
endif
If the length of string_val is less than the extract length, ret_val will be blank.
"Wildfires are dangerous, hard to control, and economically catastrophic."
Ben Loosli