Please enable JavaScript to view this site.

ASQL Reference

Navigation: » No topics above this level «

Tab(-10,x) Syntax and Usage Notes

Scroll Prev Top Next More

This topic last updated 5 June 2024

The syntax shown for the AG_xxx functions has been simplified for easier reading but is misleading in that the delimiters between parameters (usually commas, sometimes tildes or other special characters) are meant to be transmitted literally. For example, if the syntax line shows:

? tab(-10,AG_XXX); arg1, arg2, arg3; chr(127);

the actual print statement would need to be altered to send literal commas as shown here:

? tab(-10,AG_XXX); arg1; ","; arg2; ","; arg3; chr(127);

In the case of comma delimiters, the easiest way to achieve this effect would be to replace the ? (PRINT) command with WRITECD (comma delimited), e.g;

writecd tab(-10, AG_XXX); arg1, arg2, arg3; chr(127);

WRITECD not only takes care of the comma delimiters but also adds quotes as needed to any arguments that have embedded commas.

To further clarify, assuming that the value of arg1 was "one", arg2 was "two" and arg3 was "three", the actual string sent to the client (between the tab prefix and the chr(127) suffix would be:

"one,two,three";

Note that in most cases it will be cleaner and simpler to just use the MX_AGWRAPPER wrapper function.

See Also

AGCMD, a utility to test AG_xxx functions and responses without writing any code