:: Re: [DNG] Tcl as a scripting langua…
Kezdőlap
Delete this message
Reply to this message
Szerző: Tim Wallace
Dátum:  
Címzett: dng
Tárgy: Re: [DNG] Tcl as a scripting language: 4/2/2025 7pm Eastern Standard time
You don't really do RPN arithmetic within tcl. You use the expr command (with curly braces) which gives you C-like arithmetic. Grepping through some of my tcl code, it's like this:

set centerX [expr {$pX +($pWidth / 2)}]
or
set idx [expr {$size(1) < $size(2) ? 1 : 2}]

--Tim
     On Friday, April 4, 2025 at 03:26:13 PM EDT, Steve Litt <slitt@???> wrote:  


Didier Kryn said on Fri, 4 Apr 2025 10:37:55 +0200

I think the RPN was more convenient for a pocket
>calculator. But note things are very different when you need to
>remember everyting you type than when you can read and edit the whole
>formula in the text editor.


This distinction could be partially eliminated by using tclsh
interactively. Also, algebraic notation can be obtained by piping to
and from bc.

SteveT

Steve Litt

http://444domains.com

_______________________________________________
Dng mailing list
Dng@???
Manage your subscription: https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
Archive: https://lists.dyne.org/lurker/list/dng.en.html