|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Peter Popov <pet### [at] vipbg> wrote:
> On 12 Feb 2001 12:45:11 -0500, Geoff Wedig
> <wed### [at] darwinepbicwruedu> wrote:
>>So, are you volunteering to add this? ;)
> Actually, no <blush>. I am quite busy at the Uni and when I eventually
> have to resurrect whatever programming skills I might have left, I
> will need all the time I have to work on my bachelor's project. Sorry.
Drat. ;)
Geoff
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
If you have portability troubles, see www.stlport.org. There are lots of
supported compilers.
Apropos STL problems: there are brain-damaged compilers (any reference to
VisualC++ is purely intentional) which cannot handle partial template
specializations but, with enough #ifdefs...
Bye!!!!
Alessandro Coppo
a.c### [at] iolit
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In article <uuhf8tot4cqub4e7vaj2r3r1r602q373cq@4ax.com>, Peter Popov
<pet### [at] vipbg> wrote:
> 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
Don't forget copy and insert (maybe splice will do insert, and slice
specifying the whole array would do copy, so maybe you didn't forget
them...but maybe they should be included just for completeness).
These would be very useful, especially in things like particle
simulations. Another idea: a for_all() function that takes an array and
macro as parameters, and performs the macro on each defined item in the
array.
#declare MyArray = array ...
#macro Update(Item, Array, Index)
// the first three parameters of the macro would be the current
// item, the array, and the index value.
// Macros with 1 or 2 parameters should also be allowed.
#end
#macro Update2(Item, Array, Index, Time, Iterations)
// Macros with more parameters would have them specified in the
// for_all() call, and the same values would be used for all calls.
#end
for_all(MyArray, Update, MyClock, 25)
I have no idea how to do this, but it would probably be useful...and you
could probably do most of it with a macro, but it wouldn't be as fast.
--
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/
<><
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Thu, 15 Feb 2001 06:31:59 -0500, Chris Huff <chr### [at] maccom>
wrote:
>Another idea: a for_all() function that takes an array and
>macro as parameters, and performs the macro on each defined item in the
>array.
Similar to ForEach(x) in Pascal. IIRC (I haven't touched Pascal in
like eight years) it worked like this:
foreach(something) do
begin
...
...
...
end;
I would also like to see an equivalent of the 'with' but that would
imply an OO concept and I don't think it's time for that yet (I hear
booing already)
Peter Popov ICQ : 15002700
Personal e-mail : pet### [at] vipbg
TAG e-mail : pet### [at] tagpovrayorg
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In article <rggp8t019366bfd5tqif0rami2l5pk9ihm@4ax.com>, Peter Popov
<pet### [at] vipbg> wrote:
> I would also like to see an equivalent of the 'with'
What do you mean? I don't remember using "with" in Pascal, but my only
experience with Pascal was a class a couple years ago.
> but that would imply an OO concept and I don't think it's time for
> that yet (I hear booing already)
It's too bad people have knee-jerk reactions to this kind of thing...POV
manipulates objects, so some basic OO concepts would fit right in. It
already has a kind of inheritance...(copies of objects inherit from the
original variable, and can override some attributes, like texture and
position. I think this is called "prototype-based inheritance", and it
seems to be a perfect fit for POV.)
--
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/
<><
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Thu, 22 Feb 2001 11:57:11 -0500, Chris Huff wrote:
>In article <rggp8t019366bfd5tqif0rami2l5pk9ihm@4ax.com>, Peter Popov
><pet### [at] vipbg> wrote:
>
>> I would also like to see an equivalent of the 'with'
>
>What do you mean? I don't remember using "with" in Pascal, but my only
>experience with Pascal was a class a couple years ago.
If C had an equivalent, you could do something like this:
struct foo {
int bar;
int baz;
} quux, zort;
with (quux) {
bar = 0;
baz = 2;
}
Essentially, it saves you from having to type "quux." a bunch of times.
--
Ron Parker http://www2.fwi.com/~parkerr/traces.html
My opinions. Mine. Not anyone else's.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|