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!

user defined functions in programming

Status
Not open for further replies.

JimBlech

Mechanical
May 26, 2004
4
0
0
US
I use "user" defined functions regularly, some of these functions are programs. I have been getting the following error message:

there must be a scaler or array here

This is referring to the arguments in my function call. I have been getting this error for both scaler and array arguments. Sometimes, I retype the program exactly the same and the error goes away.

Right now, I am getting this error with my scaler arguments.

Regards, JimBlech



 
Replies continue below

Recommended for you

I have done some additional analysis and found my error. Although the argument in the function was a vector, one the elements was supposed to be a number and in fact was a character variable. Once I fixed that, the problem went away.

The news for me is that this error message not refers to the type of argument but also the type of data in the argument (if it is a vector).

JimBlech
 
Status
Not open for further replies.
Back
Top