×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Patran PCL - Using Variable name in function

Patran PCL - Using Variable name in function

Patran PCL - Using Variable name in function

(OP)
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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources