Top
Back: string
Forward: string expressions
FastBack:
FastForward:
Up: string
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

4.21.1 string declarations

Syntax:
string name = string_expression ;
string name = list_of_string_expressions ;

Purpose:
defines a string variable.

Default:
"" (the empty string)

Example:
 
  string s1="Now I know";
  string s2="how to encode a \" in a string...";
  string s=s1+" "+s2; // concatenation of 3 strings
  s;
==> Now I know how to encode a " in a string...
  s1,s2;   // 2 strings, separated by a blank in the output:
==> Now I know how to encode a " in a string...


Top Back: string Forward: string expressions FastBack: FastForward: Up: string Top: Singular Manual Contents: Table of Contents Index: Index About: About this document
            User manual for Singular version 4.3.2, 2023, generated by texi2html.