Literals/String: Difference between revisions

Befunge
(Forth)
(Befunge)
Line 85:
Output:
"string data c"
 
=={{header|Befunge}}==
The double quote character (") enters a string literal mode, where ASCII values of characters encountered in the current instruction pointer direction up to the next quote are pushed onto the stack. Thus, any character may be used in a string except for a quote (ascii 34), which may be pushed using <tt>57*1-</tt>. Note: since you are pushing the string onto a stack, you usually want to define the string in reverse order so that the first character is on top.
<lang befunge>"gnirts">:#,_@</lang>
 
=={{header|C}}==
Anonymous user