On 16-10-2012 00:26, Andre Caldas wrote:
1. check for "stack underflow"; and/or
such things are dealt with
By assert, I mean: assert(inputstack[#inputstack], "Input stack should never be empty when toppath() is called.")
normally if inputstack[#inputstack] == nil then assume path "." end is good enough ... (assert might make sense in situation where otherwise a crash would occur, but that never happens here) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------