Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2010-07-06
23:23 • Ticket [3025922fff] TIP#363 - vector math, partial reference implementation ... artifact: 369a8716c7 user: kchansen
23:23 • Add attachment VTest.tcl to ticket [3025922fff] artifact: 8760715810 user: kchansen
23:23 • Add attachment tclExecute.c to ticket [3025922fff] artifact: 97ec22cd9c user: kchansen
23:23 • Ticket [3025922fff] TIP#363 - vector math, partial reference implementation ... artifact: 2d5e26465a user: kchansen
23:22 • Add attachment tclInt.h to ticket [3025922fff] artifact: c3fe6a7e04 user: kchansen
23:22 • Ticket [3025922fff] TIP#363 - vector math, partial reference implementation ... artifact: dd0b87d76e user: kchansen
16:22 • New ticket [3025922fff]. artifact: c579904614 user: kchansen

TIP#363 - vector math, partial reference implementation

Open3025922fffffffffffffffffffffffffffffffffCreated 16 years agoUpdated 16 years ago
Descriptionplain2010-07-06 16:22:11
Implements vector-vector, vector-scalar, and scalar-vector add/sub/mul/div in expr.

Very minor impact on core execution.  Two files touched in generic:

tclInt.h -- added a couple of macros to help processing lists of numbers

tclExecute.c -- added vector-vector and vector-scalar handling per above

Compiles & runs with 8.6b1.

VTest.tcl exercises the mods.  Printf's show where the code is running....

Handles stuff like:

    set V [list 5 4 3 2 1]
    set W [list 1 2 3 4 5]

    expr {$V + $W}

    set X 10

    expr {$V * $X}

    expr {$X / $V}
kchansenplain2010-07-06 23:22:12
File Added - 379348: tclInt.h
kchansenplain2010-07-06 23:23:16
File Added - 379349: tclExecute.c
kchansenplain2010-07-06 23:23:57
File Added - 379350: VTest.tcl
Log in (anonymous is fine) to add a comment.

Attachments: