lifetime

Sets the lifetime of the current instance.

Syntax

status = lifetime ( seconds ) ;

Arguments

int seconds

Return Value

str status

Exceptions

%ARGUMENT : Invalid arguments. Usage: status = lifetime ( seconds ) ;

Description

If n seconds are specified in the lifetime() function, then a %DEATH signal will be generated after n seconds have elapsed. If an on_death handler has been specified, then the instance whose death has arrived can reissue the lifetime() function to extend life, otherwise the instance will exit. If the death condition occurs for the concept instance, then all instances will exit.

Examples

To execute the example below, press or modify the example to try different variations.

Related Links

None