Format command

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

Moderators: silvia, selimgunay, Moderators

Post Reply
hamidkhodadadi
Posts: 5
Joined: Tue Jun 19, 2012 12:40 am
Location: United States

Format command

Post by hamidkhodadadi »

Hi all
who can explain this command for me? what Format command do?
puts [format "\n\nReduced dT to:%1.1e; LF=%3.5f, Disp=%3.2f\n\n" \$dTtrial [getTime] [expr $tDisp*1000.] ]
thanks alot.
kovacsma
Posts: 9
Joined: Mon Sep 15, 2014 5:39 pm
Location: McMaster

Re: Format command

Post by kovacsma »

It's actually a TCL command -- part of the language that OpenSees relies on. It's not specific to OpenSees processes. The details are provided here: https://www.tcl.tk/man/tcl8.4/TclCmd/format.htm

Essentially it does with sprintf does in MATLAB (maybe you're familiar with that...)
hamidkhodadadi
Posts: 5
Joined: Tue Jun 19, 2012 12:40 am
Location: United States

Re: Format command

Post by hamidkhodadadi »

Tanks alot.
It was so helpfull.
Post Reply