function

quote . database . sncode

VERSIONlatest Quotation for string.

QUOTE

NAME

quote - This is a repertoire of quotations for strings.

SYNOPSIS

q(…) q[…] q{…} q<…> qq " '

DESCRIPTION

Quotation in Extenso start with " and finish with " or start with ' and finish with '. Inside these quotes, some characters have special meaning.

  • A \ followed by a \ return a \
  • A \ followed by a a return a bell
  • A \ followed by a b return a backspace
  • A \ followed by a f return a form feef
  • A \ followed by a n return a newline
  • A \ followed by a t return a tab
  • A \ followed by a r return a return
  • A \ followed by a v return a vertical form feed
  • A \ followed by a o followed by two octal number return the octal value.
  • A \ followed by a x followed by two hexadecimal number return the hexadecimal value.
  • A \ followed by a u followed by two or three hexadecimal number return the corrsponding utf-8 value.
  • A \ followed by a N is reserved for future used.

If you are using quote with " then a \ followed by a " return a ".

If you are using quotes with ' then a \ followed by a ' return a '.

You can also used the special q(…) or q<…> or q{…} or q[…] or q followed by any other character followed by the string not containing the character until the strinedg is finish as in for example q/…/.

The supported characters are /, #, @, !, $, %, ?, &

You can also use qq to quote a string but the \ has no special meaning.

A variable of this form is dq and dqq. In that case, 2 characters will be used for the quote.

EXAMPLES

Note: In the followings examples, the _ between the { should be removed to make it work.

res={_{a="01 = \o60\o61"; a;}}. retourne res=01 = 01.
res={_{a="01 = \x30\x31"; a;}}. retourne res=01 = 01.
res={_{a="01 = \xa2\xA2"; a;}}. retourne res=01 = \xa2\xa2.
res={_{a="01 = \uc3A9"; a;}}. retourne res=01 = é.
res={_{a="01 = \uCFB6"; a;}}. retourne res=01 = ϶.
res={_{a="01 = ⇸ = \ue287b8"; a;}}. retourne res=01 = ⇸ = ⇸.
res={_{a="1\2";a;}}. retourne res=1\2.),0,
res={_{a=q(1\2);a;}}. retourne res=1\2.),0,
res={_{a=q(1\2);a;}}. retourne res=1\2.),0,
res={_{a=q(01 = \x30\x31); a;}}. retourne res=01 = 01.
res={_{a=q(01 = \xa2\xA2); a;}}. retourne res=01 = \xa2\xa2.
res={_{a=q(1\2);a;}}. retourne res=1\2.),0,
res={_{a=q(1\2);a;}}. retourne res=1\2.),0,
res={_{a=q(01 = \o60\o61); a;}}. retourne res=01 = 01.
res={_{a=q(01 = \uc3A9); a;}}. retourne res=01 = é.
res={_{a=q(01 = \uCFB6); a;}}. retourne res=01 = ϶.
res={_{a=q(01 = ⇸ = \ue287b8); a;}}. retourne res=01 = ⇸ = ⇸.
res={_{a=qq(01 = ⇸ = \ue287b8); a;}}. retourne res=01 = ⇸ = \ue287b8.
res={_{ dqq({ allo}. }); }}. return res= allo}. .
res={_{ dq({ allo}. }); }}. return res= allo}. .

AUTHOR

Written by Pierre Laplante and Caroline Laplante, <laplante@sednove.com>