Skip to content
Tcl Source Code View Ticket
Login

View Ticket

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: