Tcl Library Source Code

Check-in [ec7b5576d0]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2018 Conference, Houston/TX, US, Oct 15-19
Send your abstracts to tclconference@googlegroups.com
or submit via the online form by Aug 20.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Repair the example - replacing the square brackets by [lb] and [rb] to prevent evaluation
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:ec7b5576d04882c6e9198dc40bb0bfc977aee1193bcdd431a0e83481ec7f1431
User & Date: arjenmarkus 2018-03-13 20:29:15
Context
2018-05-07
17:02
Tkt [e72cf5e815] - Merged feature branch check-in: f14ecf1992 user: aku tags: trunk
2018-04-17
10:35
Create new branch named "autoproxy-twapi-support" check-in: c732c4cffa user: apnadkarni tags: autoproxy-twapi-support
2018-03-13
20:29
Repair the example - replacing the square brackets by [lb] and [rb] to prevent evaluation check-in: ec7b5576d0 user: arjenmarkus tags: trunk
2018-02-17
05:29
Bumped release information in the homepage. check-in: 7dc753b7b0 user: aku tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to modules/math/decimal.man.

62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
    # Other examples
    #
    # Subtraction
    set c [lb]::math::decimal::- $a $b[rb]
    puts [lb]::math::decimal::tostr $c[rb] ; # => will output 8.0

    # Why bother using this instead of simply expr?
    puts [expr {8.2 + .2}] ; # => will output 8.399999999999999
    puts [expr {8.2 - .2}] ; # => will output 7.999999999999999
    # See http://speleotrove.com/decimal to learn more about why this happens.
[example_end]

[section "API"]
[list_begin definitions]

[call [cmd ::math::decimal::fromstr] [arg string]]







|
|







62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
    # Other examples
    #
    # Subtraction
    set c [lb]::math::decimal::- $a $b[rb]
    puts [lb]::math::decimal::tostr $c[rb] ; # => will output 8.0

    # Why bother using this instead of simply expr?
    puts [lb]expr {8.2 + .2}[rb] ; # => will output 8.399999999999999
    puts [lb]expr {8.2 - .2}[rb] ; # => will output 7.999999999999999
    # See http://speleotrove.com/decimal to learn more about why this happens.
[example_end]

[section "API"]
[list_begin definitions]

[call [cmd ::math::decimal::fromstr] [arg string]]