POV-Ray : Newsgroups : povray.advanced-users : Sub routines : Re: Sub routines Server Time
29 Jul 2024 06:19:53 EDT (-0400)
  Re: Sub routines  
From: Peter Popov
Date: 24 Nov 2002 14:37:35
Message: <eea2uuc6r477082dlg4r529776qs7hkl7g@4ax.com>
On Sun, 24 Nov 2002 14:40:58 GMT, mca### [at] aolcomcom (Stephen McAvoy)
wrote:

>In Basic I would use a "goto" or "gosub" statement, but
>the SDL does not have labels or line numbers, as far as I can see.
>Using macros seems very heavy handed and inelegant. No offence meant.

So the BASIC way, which is virtually the BASIC-only way, is more
elegant that what 95% of the rest of the languages use (that is,
function calls with parameters and return values)? Sorry, beats me.

You can pass parameters to a macro, it can return a value - what else
do you need? The reason it is not a function is that it can do stuff
only a macro can do, and it is executed at parse time, not at render
time - other than that, it's a good as function (or sub, if you like)
as any. Just read the docs more carefully to learn how to use it.


Peter Popov ICQ : 15002700
Personal e-mail : pet### [at] vipbg
TAG      e-mail : pet### [at] tagpovrayorg


Post a reply to this message

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