Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Patran PCL - Using Variable name in function

Status
Not open for further replies.

Adryalle

Aerospace
May 7, 2014
1
Hi,

Does anyone know how to place a string variable into the slot for the field name ("filename.extension") for a function in Patran PCL?

--------------------------------------

STRING filename[200] = /data/.../.../filename.extension
STRING filename2[200] = /data/.../.../filename.extension
[...]
When i copy the session file it's like that : function("filename.extension, ["filename2.extension"], 1)

and when i want to put my variable : function( filename, ["filename2"], 1)

The first one has no problem, but the second one is a problem for me... i can't put the "[ ]" because the compiler read only the name of the variable and not the value of this variable, here it's "/data/.../.../filename.extension"

The error is "Improper syntax for array constant" or "Missing right parenthesis"
---------------------------------------

I tried a lot of way like :

filename
"filename"
"["filename"]"
(filename)
("filename")
$filename
"$filename"
($filename)

Thanks by advance!

*Post inspired by FEAguy27
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor