Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
20
Task/Literals-String/ALGOL-W/literals-string.alg
Normal file
20
Task/Literals-String/ALGOL-W/literals-string.alg
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
begin
|
||||
% String literals are enclosed in double-quotes in Algol W. %
|
||||
% There isn't a separate character type but strings of lenghth one can %
|
||||
% be used instead. %
|
||||
% There are no escaping conventions used in string literals, except that %
|
||||
% in order to have a double-quote character in a string, two double %
|
||||
% quotes must be used. %
|
||||
% Examples: %
|
||||
|
||||
% write a single character %
|
||||
write( "a" );
|
||||
|
||||
% write a double-quote character %
|
||||
write( """" );
|
||||
|
||||
% write a multi-character string - note the "\" is not an escape %
|
||||
% and a\nb will appear on the output, not a and b on separate lines %
|
||||
write( "a\nb" );
|
||||
|
||||
end.
|
||||
Loading…
Add table
Add a link
Reference in a new issue