- ABORT
- ABORT"
- ABS
- ACCEPT
- ACTION-OF
- AGAIN
- ALIGN
- ALIGNED
- ALLOT
- AND
- BASE
- BEGIN
- BL
- BUFFER:
- [
- [CHAR]
- [COMPILE]
- [']
- CASE
- C,
- CELL+
- CELLS
- C@
- CHAR
- CHAR+
- CHARS
- COMPILE,
- CONSTANT
- COUNT
- CR
- CREATE
- C!
- :
- :NONAME
- ,
- C"
- DECIMAL
- DEFER
- DEFER@
- DEFER!
- DEPTH
- DO
- DOES>
- DROP
- DUP
- /
- /MOD
- .R
- .(
- ."
- ELSE
- EMIT
- ENDCASE
- ENDOF
- ENVIRONMENT?
- ERASE
- EVALUATE
- EXECUTE
- EXIT
- =
- FALSE
- FILL
- FIND
- FM/MOD
- @
- HERE
- HEX
- HOLD
- HOLDS
- I
- IF
- IMMEDIATE
- INVERT
- IS
- J
- KEY
- LEAVE
- LITERAL
- LOOP
- LSHIFT
- MARKER
- MAX
- MIN
- MOD
- MOVE
- M*
- -
- NEGATE
- NIP
- OF
- OR
- OVER
- 1-
- 1+
- PAD
- PARSE-NAME
- PARSE
- PICK
- POSTPONE
- +
- +LOOP
- +!
- QUIT
- RECURSE
- REFILL
- REPEAT
- RESTORE-INPUT
- R@
- ROLL
- ROT
- RSHIFT
- R>
- SAVE-INPUT
- SIGN
- SM/REM
- SOURCE-ID
- SOURCE
- SPACE
- SPACES
- STATE
- SWAP
- ;
- S\"
- S"
- S>D
- !
- THEN
- TO
- TRUE
- TUCK
- TYPE
- '
- *
- */
- */MOD
- 2DROP
- 2DUP
- 2/
- 2@
- 2OVER
- 2R@
- 2R>
- 2SWAP
- 2!
- 2*
- 2>R
- U.R
- UM/MOD
- UM*
- UNLOOP
- UNTIL
- UNUSED
- U.
- U<
- U>
- VALUE
- VARIABLE
- WHILE
- WITHIN
- WORD
- XOR
- 0=
- 0<
- 0>
- 0<>
- \
- .
- <
- >
- <>
- #>
- <#
- #
- #S
- (
- ?DO
- ?DUP
- >BODY
- >IN
- >NUMBER
- >R
6.2.2266 S\" s-backslash-quote CORE EXT
Interpretation:
Interpretation semantics for this word are undefined.
Compilation:
( "ccc<quote>" -- )
Parse ccc delimited by
Parse ccc delimited by
"
(double-quote), using the
translation rules below. Append the run-time semantics given below to
the current definition.
Translation rules:
Characters are processed one at a time and appended to the compiled
string. If the character is a `\' character it is processed by
parsing and substituting one or more characters as follows, where
the character after the backslash is case sensitive:
\a | BEL | (alert, | ASCII 7) |
\b | BS | (backspace, | ASCII 8) |
\e | ESC | (escape, | ASCII 27) |
\f | FF | (form feed, | ASCII 12) |
\l | LF | (line feed, | ASCII 10) |
\m | CR/LF | pair | (ASCII 13, 10) |
\n | newline | (implementation dependent , e.g., CR/LF, CR, LF, LF/CR) | |
\q | double-quote | (ASCII 34) | |
\r | CR | (carriage return, | ASCII 13) |
\t | HT | (horizontal tab, | ASCII 9) |
\v | VT | (vertical tab, | ASCII 11) |
\z | NUL | (no character, | ASCII 0) |
\" | double-quote | (ASCII 34) | |
\x <hexdigit><hexdigit> | |||
The resulting character is the conversion of these two hexadecimal
digits. An ambiguous conditions exists if \x is not
followed by two hexadecimal characters.
| |||
\\ | backslash itself | (ASCII 92) |
An ambiguous condition exists if a \ is placed before any character, other than those defined in here.
Run-time:
( -- c-addr u )
Return c-addr and u describing a string consisting of the translation of the characters ccc. A program shall not alter the returned string.
Return c-addr and u describing a string consisting of the translation of the characters ccc. A program shall not alter the returned string.
See:
ContributeContributions
AntonErtl [29] Core-ext S\" should reference File-ext S\"Proposal2017-04-16 08:03:17
This contribution has been moved to the proposal section.
GerryJackson [51] Reference implementation for S\"Suggested reference implementation2018-01-30 08:13:52
A reference implementation for S" exists at http://www.forth200x.org/escaped-strings.html. Shouldn't this be included in Annex E?
Similarly test cases for S" should be in Annex F, the above link also has these.