POV-Ray : Newsgroups : povray.off-topic : Colour consoles : Re: Colour consoles Server Time
7 Sep 2024 03:20:40 EDT (-0400)
  Re: Colour consoles  
From: Invisible
Date: 20 Aug 2008 11:42:13
Message: <48ac3b55$1@news.povray.org>
>> In
>> particular, I cannot for the life of me figure out how to get at
>> symbolic constant names. :-(
> 
> In C?  Look at #define

I meant how to get that stuff into Haskell.

It seems Haskell provides a magical command which somehow lets you call 
a C function as if it's a Haskell function, assuming you can find a 
header file that contains the C function you're after. (I literally have 
*no idea* how the linker finds the actual code...) However, there seems 
to be no way to import constants. In fact, every Haskell binding I've 
looked at has these hard-coded in the Haskell source code rather than 
imported, so I've just waded through a few KB of header files tracking 
down all the #defines and their literal values.

And you know what?

I just ported my program to Haskell, AND IT STILL WORKS CORRECTLY! 0_0

This is an unprecidented level of success. It seems I can actually call 
any C function I have a header file for. Wow.

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

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