Tcl Source Code

View Ticket
Login
Ticket UUID: 3025922
Title: TIP#363 - vector math, partial reference implementation
Type: Patch Version: TIP Implementation
Submitter: kchansen Created on: 2010-07-06 16:22:11
Subsystem: 48. Number Handling Assigned To: dgp
Priority: 5 Medium Severity:
Status: Open Last Modified: 2010-07-06 23:23:57
Resolution: None Closed By:
    Closed on:
Description:
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}
User Comments: kchansen added on 2010-07-06 23:23:57:

File Added - 379350: VTest.tcl

kchansen added on 2010-07-06 23:23:16:

File Added - 379349: tclExecute.c

kchansen added on 2010-07-06 23:22:12:

File Added - 379348: tclInt.h

Attachments: