Skip to content

_lifetime

bergsma edited this page Sep 26, 2014 · 3 revisions

#lifetime

###Sets the lifetime of the current instance.

Syntax

status = lifetime seconds ;

Arguments

  1. int seconds

The number of seconds in the lifetime. A value of zero sets an infinite lifetime.

Return Value

str status
  • $ACKNOWLEDGE : The lifetime was set.

The STATUS variable is set to $ACKNOWLEDGE

str status
  • $ACKNOWLEDGE : The lifetime was set.

The STATUS variable is set to $ACKNOWLEDGE

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

puts "Create an example for the function 'lifetime'" ;

Related Links

None

Clone this wiki locally