POV-Ray : Newsgroups : povray.off-topic : Standard libraries : Re: Standard libraries Server Time
6 Sep 2024 15:18:10 EDT (-0400)
  Re: Standard libraries  
From: Warp
Date: 7 Mar 2009 17:51:22
Message: <49b2fa6a@news.povray.org>
Nicolas Alvarez <nic### [at] gmailcom> wrote:
> int& foo() {
>    int myNumber = 42;
>    return myNumber;
> }

> Undefined behavior when the caller tries to do something with the reference.

  I think there's a reason why you can't have references to primitive
types in Java.
  (Sometimes this can be a bit limiting, eg. because you can't pass
primitive types by reference to functions, for them to modify the
original values rather than copies.)

-- 
                                                          - Warp


Post a reply to this message

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