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!

user defined functions in programming

Status
Not open for further replies.

JimBlech

Mechanical
Joined
May 26, 2004
Messages
4
Location
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



 
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.

Part and Inventory Search

Sponsor

Back
Top