POV-Ray : Newsgroups : povray.general : Suggestion: array functions : Suggestion: array functions Server Time
8 Aug 2024 06:13:14 EDT (-0400)
  Suggestion: array functions  
From: Peter Popov
Date: 12 Feb 2001 07:15:03
Message: <uuhf8tot4cqub4e7vaj2r3r1r602q373cq@4ax.com>
Arrays are a very useful addition to POV but there are some
restrictions imposed by the current implementation. Therefore I
suggest that a set of functions to operate with arrays be added to POV
(well, to some unofficial version at the moment, since the feature
list of 3.5 is locked):

pop 	Removes the last element of an array, and returns its value

push 	Adds one or more elements to the end of an array

reverse Reverses the direction of an array.

sort 	Sorts an array in place

shift 	Removes the first element from an array and returns its value

unshift	Adds one or more elements to the beginning of an array

slice 	Extracts a section of an array and returns it as a new array

splice 	Adds and/or removes elements from an array

What do you people (esp. the program-oriented folk) think about these?
Would they be useful? If so, would any kind soul care to patch them
in? :))


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.