|
From: Arjen M. <Arj...@de...> - 2018-12-12 10:56:30
|
Hi Igor,
This kind of question is best posed on the comp.lang.tcl newsgroup. But studying the source code I conclude that the code as you posted it would never reach the [puts] statement: step keeps a value of 0.1 and is never changed within the while loop. So the question is: is this really the code that is going wrong in the sense that you imply?
As a matter of style: always brace your expressions: set tmp_val_PHI2 [expr $tmp_val_PHI2 + $step] ==> set tmp_val_PHI2 [expr {$tmp_val_PHI2 + $step}]
(You could end up with the error message if the closing brace is placed in the wrong place)
Regards,
Arjen
From: igor denisov <sau...@gm...>
Sent: 12 December 2018 02:52
To: tcl...@li...
Subject: [Tcl-gsoc] (no subject)
Hello there,
This is a small part of app written in lisp. And there is something wrong
proc make_lst_of_val_PHI2 {tmp_val_PHI2 step
tmp_lst_of_val_PHI2} {
set tmp_val_PHI2 0
set step 0.1
set tmp_lst_of_val_PHI2 0
while {$step < 6.28} {
set tmp_val_PHI2 [expr $tmp_val_PHI2 + $step]
lappend tmp_lst_of_val_PHI2 $tmp_val_PHI2
}
put $tmp_lst_of_val_PHI2
}
output no such variable tmp_lst_of_val_PHI2.
DISCLAIMER: This message is intended exclusively for the addressee(s) and may contain confidential and privileged information. If you are not the intended recipient please notify the sender immediately and destroy this message. Unauthorized use, disclosure or copying of this message is strictly prohibited. The foundation 'Stichting Deltares', which has its seat at Delft, The Netherlands, Commercial Registration Number 41146461, is not liable in any way whatsoever for consequences and/or damages resulting from the improper, incomplete and untimely dispatch, receipt and/or content of this e-mail.
|