DEPRECATION WARNING

Discussions about CSEntry
Forum rules
New release: CSPro 8.0
Post Reply
col Ar
Posts: 24
Joined: January 11th, 2019, 4:05 am

DEPRECATION WARNING

Post 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?
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: DEPRECATION WARNING

Post 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.
col Ar
Posts: 24
Joined: January 11th, 2019, 4:05 am

Re: DEPRECATION WARNING

Post by col Ar »

Thanks Josh.
Much appreciated
Post Reply