Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-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
Jan 31, 2007
6
0
0
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
 
Replies continue below

Recommended for you

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.
Back
Top