Make string into a valid EViews name.
Syntax: @makevalidname(str)
str: string
Return: string
Returns a string containing an uppercased valid EViews name based on str.
• If str is a valid name, then the original string str is returned.
• If str exceeds the maximum length, the resulting string will be truncated.
• If str is not a valid name, invalid characters will be replaced in the new string with “_” prior to the return.
Examples
@makevalidname("re!sult%")
returns the string “RE_SULT_”.
@makevalidname("evname01")
returns the string “EVNAME01”.
If ALPHA1 is an alpha series,
alpha a1 = @makevalidname(alpha1)
returns valid EViews names based on ALPHA1 for each observation in the workfile sample.
If SVEC1 is an string vector,
svector sv1 = @makevalidname(svec1)
returns a string vector containing valid names corresponding to elements of SVEC1.
Cross-references