POV-Ray : Newsgroups : povray.off-topic : Question to the programers here : Re: Question to the programers here Server Time
29 Jul 2024 16:22:59 EDT (-0400)
  Re: Question to the programers here  
From: Jim Henderson
Date: 29 Jul 2011 20:14:49
Message: <4e334cf9$1@news.povray.org>
On Fri, 29 Jul 2011 18:46:12 -0400, H. Karsten wrote:

> He people,
> 
> I've just started to write little things, using Rebol. There are things
> I really hate but a few things I really love, such as no need to
> initialise the size of an array.
> 
> I just initialise an array with the size of zero an append something to
> it.
> 
> No other language I've used before can do so.
> 
> Now I like to know, if there are other languages, can do like Rebol
> does.
> 
> I'm thankful for any hint.

You can kinda do this in C - you can initialize a variable as a pointer, 
and then allocate memory to the buffer as needed - but you have to 
allocate the memory or you can end up corrupting your data in memory (at 
best, at worst you could overwrite the program in memory if you're not 
careful).

But you can't just append data to it, you do have to allocate the memory 
yourself (as a programmer).

Jim


Post a reply to this message

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