Page 1 of 1

DEPRECATION WARNING

Posted: January 12th, 2019, 10:47 am
by col Ar
DEPRECATION: Consider using a variable-length 'string' instead of a fixed-length 'alpha' for alphanumeric variables
This is my code please

Code: Select all

alpha(string)	cod_oper, x;					{ Operator code }
alpha(1)	scode;						{ serial code to retrieve the operator id }
How can I help this please?

Re: DEPRECATION WARNING

Posted: January 12th, 2019, 11:54 am
by josh
Do not use variables of type alpha. So instead of:
alpha(10) myvariable;
use
string myvariable;
With string you do not need to worry about the length. It will grow to be as big as it needs to be to handle whatever value you assign to it.

Re: DEPRECATION WARNING

Posted: January 12th, 2019, 1:00 pm
by col Ar
Thanks Josh.
Much appreciated