about abs() function in TCL

Forum for OpenSees users to post questions, comments, etc. on the use of the OpenSees interpreter, OpenSees.exe

Moderators: silvia, selimgunay, Moderators

Post Reply
karimtarbali
Posts: 82
Joined: Fri Aug 14, 2009 12:11 am
Location: iiees

about abs() function in TCL

Post by karimtarbali » Mon Jul 04, 2011 8:26 am

Hi
i use this code :
for {set j 1} { $j <=$NTHA_Step } {incr j 1} {

set teta($j) [lindex $file_read $j]
set abs_teta($j) [expr abs ( $teta($j) ) ]
}
but i get this error : too few arguments for math function "abs"

i ckecked , the teta($j) s are calculated.
could you please tell me what i do wrong
thanks
kt

fmk
Site Admin
Posts: 5883
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Re: about abs() function in TCL

Post by fmk » Tue Jul 05, 2011 10:26 pm

it could be he end of file is causing you problems, put a puts right before the abs to see.

silvia
Posts: 3909
Joined: Tue Jan 11, 2005 7:44 am
Location: Degenkolb Engineers
Contact:

Re: about abs() function in TCL

Post by silvia » Wed Jul 06, 2011 8:18 am

it may be the space between abs and the parenthesis
Silvia Mazzoni, PhD
Structural Consultant
Degenkolb Engineers
235 Montgomery Street, Suite 500
San Francisco, CA. 94104

Post Reply