POV-Ray : Newsgroups : povray.pov4.discussion.general : Curly braces replaced by indentations but only as an option ? : Re: Curly braces replaced by indentations but only as an option ? Server Time
1 Apr 2025 16:35:55 EDT (-0400)
  Re: Curly braces replaced by indentations but only as an option ?  
From: ingo
Date: 20 Mar 2025 13:30:00
Message: <web.67dc4f677e3c5a9917bac71e8ffb8ce3@news.povray.org>
"jr" <cre### [at] gmailcom> wrote:

> @ingo.  very happily second that.  </grin>
>

Ssst, don't tell, but table definitions are type, except type has grown in more
encompassing direction.

- pascal
type a = record
   b: integer;
   c: char;
end;


- C
struct a {
   int b;
   char c;
};

- nim
type
   A = object
      b: int
      c: char


- nim
type
  RGB = array[5, float]

  Pattern = object
    pKind: ....

  Texture = object
    pattern: seq[Pattern]

  Material = object
    texture: seq[texture]

template rgb*(r, g, b, filter, transmit: float): RGB =
 [x, y, z, filter, transmit]

template `r=`*(colour: var RGB, value: float) = colour[0] = value
template `g=` ...

kind off....

another language that may be of interest is Phix http://phix.x10.mx/ where
everything is array based (https://rosettacode.org/wiki/Category:Phix)

ingo


Post a reply to this message

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