Re: do you use the pre-processor?
[
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: 2000年5月10日 18:59:32 -0400 (EDT)
On 2000年5月10日 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