Gambas Documentation
Como se hace...
Compilación e instalación
Componentes
Controls pictures
Descripciones del Lenguaje
Developer Documentation
Componentes adicionales de Gambas
Cómo programar componentes en C/C++
Cómo programar componentes en Gambas
Índice Alfabético de la Interfaz de Programación de Gambas
Índice por Categorías de la Interfaz de Programación de Gambas
Name
ARG
BEGIN_METHOD_VOID
BEGIN_PROPERTY
END_METHOD
GB.Add
GB.Alloc
GB.Application.Name
GB.Application.Title
GB.Array.Count
GB.CheckPost
GB.CurrentComponent
GB.Detach
GB.ExistClass
GB.ExistFile
GB.FileName
GB.Free
GB.FreeArray
GB.FreeString
GB.GetClass
GB.GetClassName
GB.GetEnum
GB.GetEvent
GB.GetFunction
GB.GetTempDir
GB.GetTime
GB.GetUnknown
GB.Is
GB.ListEnum
GB.LoadComponent
GB.NewString
GB.NextEnum
GB.Propagate
GB.Push
GB.Realloc
GB.Ref
GB.ReleaseFile
GB.ReturnFloat
GB.ReturnLong
GB.ReturnObject
GB.StopAllEnum
GB.StopEnum
GB.StoreObject
GB.StoreString
GB.StoreVariant
GB.System.Language
GB.Unref
GB.Watch
GB_ARRAY
GB_FLOAT
GB_HOOK_LOOP
GB_HOOK_MAIN
GB_HOOK_POST
GB_HOOK_TIMER
GB_STRING
GB_T_BOOLEAN
GB_T_BYTE
GB_T_DATE
GB_T_FLOAT
GB_T_INTEGER
GB_T_LONG
GB_T_SHORT
GB_T_SINGLE
GB_T_STRING
GB_T_VARIANT
GB_TIMER
PROP
VPROP
Documentacion y Recetas
Documentación del Entorno de Desarrollo
Fragmentos de código
Glosario
Índice del Lenguaje
LÉEME
Licencia del Wiki
Manual del Wiki
Mensajes de Error
Pendiente de traducción
Registrarse
Repositorio de Aplicaciones
Tutoriales
Últimos cambios

BEGIN_METHOD

#define BEGIN_METHOD ( name , arguments ) ...

Begins the implementation of a method.

  • name is the name of the function, as specified in the class declaration.

  • arguments describes the arguments of the method.

Be careful ! As the implementation function will receive its arguments as a pointer at the interpreter stack, arguments is actually the inside of a structure describing the stack contents.

Consequently:

  • Each argument must be one of the Gambas Value Datatype.

  • The arguments are separated by semicolons, and NOT commas.

A method named "foo" declared this way :

...
GB_METHOD("foo", NULL, "iisvbInteger[];d", do_foo),
...

will be implemented this way :

BEGIN_METHOD(do_foo,
  GB_INTEGER param1;
  GB_INTEGER param2;
  GB_STRING param3;
  GB_VARIANT param4;
  GB_BOOLEAN param5;
  GB_OBJECT param6;
  GB_DATE param7)

...

END_METHOD

Note that the argument separator is a semicolon, and that the last argument has no semicolon at its end.

See also