[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: do you use the pre-processor?
- From: rw20@...
- Date: Wed, 10 May 2000 19:02:58 -0400 (EDT)
> 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.
That would work. I guess you'd need to write a local function to call if
there was more work to do, but more code space is OK while more execution
time is not.
The runtime overhead of
function test(x)
local debug_code = function(x) ... end
$assert( debug_code(x) )
print(x.name)
end