Home AMX User Forum NetLinx Studio

Differences between Netlinx/Axcess using Remove_String

I noticed that there are some differences between Netlinx and Axcess regarding the correct use of REMOVE_STRING. Consider the following line(s);

strExample[] = "' Test' ,13,10"
REMOVE_STRING (strExample,"13" ,1)

In Netlinx the result is that strExample is set to "10" , in Axcess the line compiles but doesn't remove anything, if you are in debug mode in terminal the (Accent3) master reports an error.

when using REMOVE_STRING in Axcess you HAVE to use a result string in the code, like this;

strTemp = REMOVE_STRING (strExample,"13",1)

just thought i'd mention it, i couldn't find anything documented regarding this behaviour. Or maybe i've been programming too much :D

Comments

  • Chip MoodyChip Moody Posts: 727
    I forget where I read it, but it is documented somewhere. It's basically due to the fact that in Netlinx, functions that return a value aren't required to assign that value to anything - it just goes to the great bit bucket in the sky if you don't. Axcess, however, wasn't hip enough. If a function returns something, it couldn't deal with the concept of letting that data fall into space...

    One of the few things that makes going and working in C-tron's S+ language annoying after doing a Netlinx system- they have the same requirement as Axcess.

    - Chip
Sign In or Register to comment.