POV-Ray : Newsgroups : povray.off-topic : You thought 4K graphics demos were impressive? : Re: You thought 4K graphics demos were impressive? Server Time
5 Sep 2024 13:11:00 EDT (-0400)
  Re: You thought 4K graphics demos were impressive?  
From: clipka
Date: 28 Aug 2009 22:54:20
Message: <4a98985c$1@news.povray.org>
Darren New schrieb:
>> I found a program (I forget what it did) that was runnable in multiple 
>> languages simultaneously...
> 
> I  saw that.  And not similar languages. Like, javascript, awk, Haskell, 
> and C++ or something.

I actually encountered something close to this in real-life work: It was 
a file designed to be included in both a C program and a makefile, to 
define certain constants.

And typically, pulling this off is even easier if the languages are 
quite different, as the most typical way to do it is by having one 
language see comments where the other one doesn't.

For instance, to fuse POV-Ray SDL and Lua code, you can use the 
following pattern:


#version 3.7; /* (Lua ignores first line if it starts with "#")

   -- Lua code goes here

--[=[ */

   // POV-Ray SDL code goes here

// ]=]


Post a reply to this message

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