EnglishРусский  

Ads

Scriptius script builder
Provides the best choice in work automation and great time saving features.

CreateInstall
Freeware and commercial installers

Gentee needs your help!
How to advertise with us
 
laptop battery

The extern command

You cannot call any function before its definition. The extern command provides you with preliminary declaration of a function or a method or an operator. The command allows you to call a function before it has been defined. For example, a recursive function call from another function.

The keyword extern is followed by the block that contains function declaration. Each line of the block contains either function, method, operator or property declaration, excluding their bodies.

extern 
{
   func uint b( uint i )
   func uint c( str in )
}

func uint a( uint i )
{
   return b( 2 * i ) + c( "OK OK" )
}

func uint b( uint i )
{
   return i + 20
}

func uint c( str in )
{
   uint ret i
   
   fornum i,*in
   {
      if in[i] == 'K' : ret++
   }
   return ret
}

Related links

Edit