home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-10-26 | 1.4 KB | 54 lines | [TEXT/$Tcl] |
-
-
- puts stdout [random 1024]
-
- set FD [open "JUNKER" "w"]
- puts stdout "FD = $FD"
- puts $FD "This is line one."
- puts $FD "This is line two."
- puts $FD "This is line three."
- puts $FD "This is line one.\012" nonewline
- puts $FD "This is line two.\012" nonewline
- puts $FD "This is line three.\012" nonewline
- close $FD
-
- loop index 10 101 10 {puts stdout "$index"}
-
- puts stdout [sin [expr "[pi] / 4.0"]]
- puts stdout [cos 0.0]
- puts stdout [log [exp 1]]
- puts stdout [log10 1000.0]
- puts stdout [cos 90.0]
- puts stdout [asin 1.0]
- puts stdout [acos -1.0]
-
- puts stdout [cindex "012345" 3]
- puts stdout [clength "012345"]
- puts stdout [crange "012345" 0 2]
- puts stdout [csubstr "012345" 0 2]
- puts stdout [replicate "012345" 10]
- puts stdout [translit "ABCDEFG012345" "Z%X*V&T9^7#5@" "ABCDEFG012345"]
- puts stdout [ctype alnum "012345"]
- puts stdout [ctype ascii "ABCDEF"]
- puts stdout [ctype alpha "ABC123"]
- puts stdout [ctype alpha "ABC$$$"]
- puts stdout [ctype alnum "0123."]
- puts stdout [ctype alnum "-5"]
- puts stdout [ctype cntrl "AAAAA"]
- puts stdout [ctype upper "AAAAA"]
- puts stdout [ctype lower "AAAAA"]
- puts stdout [ctype lower "a"]
- puts stdout [ctype digit "8"]
- puts stdout [ctype digit "("]
- puts stdout [ctype punct "."]
- puts stdout [ctype punct "!"]
- puts stdout [ctype punct "#"]
- puts stdout [ctype space " "]
- puts stdout [ctype ord "c"]
- puts stdout [ctype ord "C"]
- puts stdout [ctype xdigit "#"]
- puts stdout [ctype xdigit "-"]
- puts stdout [ctype lower "a"]
- puts stdout [ctype cntrl "\004"]
-
-