Announcement: old "compatibility" kludge removed from ASH

Veracity

Developer
Staff member
Release 19887 changed how ASH looks up functions. All functions that actually exist SHOULD work as before (although this is still experimental code and bugs have been found - and fixed). However, there was a "compatibility" kludge which I removed, so, some functions which DON't actually exist will no longer "work".

The issue is that 11 years ago or so we rationalized the ASH functions that convert from one data type to another. Previously, we had things like:

int string_to_int( string )
int item_to_int( item )
string int_to_string( int )
string item_to_string( item )

and so on. We replaced them with:

string to_string( anything )
int to_int( anything )

and so on. At the time, we put in a "temporary" compatibility kludge which would kick in when ASH could not find a function. If the function ended in "to_string", "to_int", or whatever, we'd strip off everything before that and return the "modern" function. So, "integer_to_string( int )" would turn into "to_string( int )".

Unfortunately, so would "this_is_bogus_to_int( random data type )".

I was in there cleaning up that code and it seemed it was long since time to remove this "temporary" conversion code. So I did.

It seems there are still some ancient scripts which never were updated. If you run them, you will get a red error message complaining about an undefined function on line XXX.
The fix is simple, even if you don't know ASH. Open the file in a text editor, go to line XXX, and change "int_to_string" to "to_string" (or whatever the issue is.
There may be multiple such old conversion functions referenced in a single script. FIx them all. If you miss any, "validate" will point out the first one you missed.
When "validate YOURSCRIPT.ash" finds no errors, you are done.

Sorry about the inconvenience.
 
Top