POV-Ray : Newsgroups : povray.beta-test : substr with negative values Server Time
29 Jul 2024 08:19:46 EDT (-0400)
  substr with negative values (Message 1 to 1 of 1)  
From: Felix Wiemann
Subject: substr with negative values
Date: 20 May 2002 14:55:07
Message: <3ce9468b@news.povray.org>
RC5, SuSE Linux 7.3, 128MB, P3 600

#debug substr("POV", -1, 3)
#debug substr("POV", 1, -2)

No error, but no char is written.

#debug substr("POV", 1, -1)

Causes an error:
| Parse Error: Attempt to malloc zero size block (File: parsestr.cpp Line:
| 496).
Maybe it should be replaced by something more useful.
-- 
Felix Wiemann


Post a reply to this message

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