Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

help for variable mastery

Status
Not open for further replies.

Fabien25

Bioengineer
Joined
Jan 31, 2007
Messages
6
Location
CA
I have a problem:

I work on batch mode on ADAMS/VIEW
I need to find a adams's function which could do that:

I enter a paramter "i". It's a integer. It is define between 1 and 40. I need an integer or a string in output like that:

i | output
---------------
1 | 01
2 | 02
3 | 03
... | ...
9 | 09
10 | 10
11 | 11
... | ...
39 | 39
40 | 40
 
If youa re familar with the SPRINF function in c, thsi si trivial,
Create your design variable
var cre var=DV_2 int=3
then use it as
STR_SPRINTF( "%02d" , {DV_2} )
This will return the string as you want it.


Jesper Slattengren
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top