In Ciao-Prolog is there a "best practice" for outputting text?
Method 1: Use quoted atoms always, e.g., write('The maximum mortgage payment is '),write(mortgage_payment).
Method 2: Use strings,e.g., writestring("The maximum mortgage payment is "),write(mortgage_payment).
where writestring is writestring([]). writestring([H|T]):-put_code(H),writestring(T).
The first method is simple and straightforward. The ISO standard makes all the escape characters (\a,\n, etc.) available, further easing (and possibly encouraging) use of this method. However it apparently creates an unneeded symbol table entry for the singly-quoted atom.
The second method is clumsier but very clearly distinguishes atoms from strings.
What do you use?
============================================================================== Message: Address: Action: help majordomo(a)clip.dia.fi.upm.es Info. on useful commands subscribe ciao-users-request(a)clip.dia.fi.upm.es Subscribe to this list unsubscribe ciao-users-request(a)clip.dia.fi.upm.es Unsubscribe from this list <whatever> ciao-users(a)clip.dia.fi.upm.es Send message to list ----------------------------------------------------------------------------- Archived messages: http://www.clip.dia.fi.upm.es/Mail/ciao-users/ -----------------------------------------------------------------------------