[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: do you use the pre-processor?
- From: Fred Bertsch <fb@...>
- Date: Wed, 10 May 2000 18:59:32 -0400 (EDT)
On Wed, 10 May 2000 rw20@cornell.edu wrote:
> Something like
>
> $define debugging true
>
> function test(x)
> if debugging then
> if type(x) ~= 'table' then
> RuntimeError('x is not a table')
> end
> end
> print(x.name)
> end
I would be happy with this. I would be even happier if that were replaced
by:
function test(x)
$assert( type(x) == 'table' )
print(x.name)
end
You might control compiling or not-compiling the $assert function call
through the $debug macro.
F