POV-Ray : Newsgroups : povray.programming : Parsing optional float parameter? : Re: Parsing optional float parameter? Server Time
28 Jul 2024 14:33:04 EDT (-0400)
  Re: Parsing optional float parameter?  
From: Peter J  Holzer
Date: 8 Dec 2000 14:02:32
Message: <slrn932a6e.gcq.hjp-usenet@teal.h.hjp.at>
On 8 Dec 2000 10:53:51 -0500, Warp wrote:
>Chris Huff <chr### [at] maccom> wrote:
>:     SecondParam = (int)Parse_Float();
>
>  I'm right now just reading both parameters to get on with my code, but
>I have a bad problem with the Parse_Float() function.
>  For some reason it always returns 1026048. For both parameters. Always.

Did you #include "express.h" in your source file? A Failure to properly
declare a function returning a non-integer often leads to strange
results like this.

The default CFLAGS setting for povray is also a bit conservative on
enabling warnings. If you are using gcc, I recommend adding 

-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs

at least for your own source files.

	hp

-- 
   _  | Peter J. Holzer    | Es war nicht Gegenstand der Abstimmung zu

| |   | hjp### [at] wsracat      | Zahlen neu festzulegen.
__/   | http://www.hjp.at/ |	-- Johannes Schwenke <jby### [at] ginkode>


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.