# The following command is equivalent to # var name = `value`
$ wok -v@char name=value
# The following command is equivalent to # var name = "value"
$ wok -v@str name=value
# The following command is equivalent to # var name = """value"""
$ wok -v@rawstr name=value
Quoting
The implimentation of wok.csv is compatible with Python's loose csv module, then, Quoting-mode, quote-char and escape-char can be set to Reader and Writer.
// Setting Quote(mode=Min, quote='"') to ReaderFQ=QuoteMin// Setting Quote(mode=All, quote='"', escape='\\') to WriterOFQ=QuoteAllQ('"') E('\\')
Encoding
// Setting Codec to ReaderCD=Codec("UTF-8")
// Setting Codec to WriterOCD=Codec("UTF-16")
Details
Built-in functions
Name
Type
Arguments
Note
print
Unit
Any *
print given data
printf
Unit
Any *
print given data and OFS
println
Unit
Any *
print given data and ORS
In
A
Iterator[List[String]] => A
Built-in variables
All the variables in the following list can be reassinged, but you should be aware of this.
If you substitute new Codec instance to CD inside of an Iterator of Row, the change would not reflect to the Iterator. This is the only limitation to the reassginment of built-in valiables.
Name
Type
Default Value
FS
Regex
Regex("[ \t]+")
RS
Regex
Regex("\r\n|\r|\n")
FQ
Quote
Quote.None
CD
Codec
Codec("utf-8")
OFS
String
" "
ORS
String
"\n"
OFQ
Quote
Quote.None
OCD
Codec
Codec("utf-8")
Built-in read-only variables
Note that the following system variables cannot be reassigned.