[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: digit strings as table indexes
- From: Sam Roberts <sroberts@...>
- Date: Thu, 25 Jan 2007 10:02:03 -0800
On Thu, Jan 25, 2007 at 10:22:09AM -0600, Jimmie Houchin wrote:
> Would it be better, even if seemingly uglier (to me) to use
> 'ssn123-45-6789' instead of simply '123-45-6789'
> which would make the digit string into a legitimate Lua name.
Actually, it wouldn't, ssn123-45-6789 is not a lua "name":
% lua
Lua 5.0.2 Copyright (C) 1994-2004 Tecgraf, PUC-Rio
> ssn123-45-6789 = 3
stdin:1: `=' expected near `-'
> ssn123 = 3
> print(ssn123-45-6789)
-6831