Skip to content

_instance

bergsma edited this page Sep 26, 2014 · 5 revisions

#instance

###The instance() function returns the name of the current instance.

Syntax

name = instance ;

Arguments

  • None

Return Value

str name
  • instanceName : The names of the current instance.

The STATUS variable is set to $ACKNOWLEDGE

str name
  • instanceName : The names of the current instance.

The STATUS variable is set to $ACKNOWLEDGE

Exceptions

  • %ARGUMENT: Invalid arguments. Usage: name = instance ;

Description

  • None

Examples

CONNECT()
{
  puts { "I am ",self()," before instance" } ;
  instance("new") ;
  puts { "I am still ",self()," after instance" } ;
  event ("new#"+self(2),"WAKEMEUP") ;
  puts { "I am ",self()," going to a poll state" } ;
  poll ;
  puts { "I am ",self()," after polling" } ;
  return ;
}

WAKEMEUP()
{
  puts { "I am ",self()," running WAKEMEUP method" } ;
  return ;
}
global WAKEMEUP ;
enable WAKEMEUP ;

CONNECT();

Related Links

instance

Clone this wiki locally