FeResPost Web Site                     FeResPost Online User Manual

VII.1.3.4 Printing beam forces

This example is stored in file “COMEX/EX03/printBeamForces.rb”. It corresponds to the example “RUBY/EX08/printBeamForces.rb” described in section IV.2.4.4. The example is also defined in the python file “COMEX/EX03/printBeamForces.py”.

No remark is to be done about these programs, except that the “UTIL” modules are used. These are defined in files “COMEX/Util/util.rb” and “COMEX/Util/util.py” for ruby and python respectively. When the ruby and python versions of the module are compared, one notes a difference in the use of iterators. The brackets are mandatory for iterators methods with arguments are used in python even when no argument is given. This means that the following ruby statement:

      res.iter.each do |key,values|

Becomes in python:

      for tab in res.iter():  
         key=tab[0]  
         values=tab[1]

(The void brackets in python first statement is related to the fact that the “iter” method of “Result” class may have up to five arguments.)

Note that the UTIL Modules in COM examples correspond to the UTIL module defined in file “RUBY/UTIL/util.rb” and described in section IV.2.1.