CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   UDF: parse error (https://www.cfd-online.com/Forums/fluent/46673-udf-parse-error.html)

manu November 26, 2007 13:27

UDF: parse error
 
I'm doing a simple DEFINE_ON_DEMAND function in a UDF and I always get the same error at some places and I don't understand why at all: "parse error at line ..." I looked on internet what people say about this error: some people say that's a problem of UDM (User Define Memory), other people say that we must use compiled and not interpreted UDF but for me that's chinese. Can someone tell me what to do? Thanks

mohanraj December 2, 2007 02:04

Re: UDF: parse error
 
1. All the variables needs to be declared at the top(before starting you manipulation or calculations); 2. Parse error occurs when you miss ";" at the end of the line. 3. If you are transferring the ".c" file from windows system to unix system there may be ^M characters sitting at the end of the line. This may lead to some errors.


manu December 4, 2007 03:19

Re: UDF: parse error
 
Thanks for the information but I think I have something more special because I made tests of my code, so that I can compile each part of it, but when I put all the parts together it doesn't work and I allways get this "PARSE ERROR" and "INVALID TYPE FOR POINTER DEREFERENCE:FLOAT" at some place of my code...

mohanraj December 4, 2007 12:09

Re: UDF: parse error
 
Pls. check that you have put in all the required library on the top of your program. Also, post the two lines of the code (ie. before and after the line error) after checking the braces({}) balance and ";"


All times are GMT -4. The time now is 05:51.