get_all_args()

[ Start > get_all_args() ] [ Edit this Page | Show Page Versions | Show Raw Source ]


get_all_args usage:

get_all_args(function_name,args,spec,&p1,...)

1. function_name: string, used for error messages if anything goes wrong.

  1. args: integer, received from the interpreter.
  2. spec: printf-like specification of expected arguments.
  3. p1, p2...: pointers to argument holders

    Valid types specifiers (from comment in module_support.c):

    * %i: INT_TYPE

  • %I: int or float -> INT_TYPE
  • %d: int (the c type "int" which may vary from INT_TYPE)
  • %D: int of float -> int
  • %+: positive int -> INT_TYPE
  • %l: int or bignum -> LONGEST
  • %s: char * Only narrow (8 bit) strings.
  • %n: struct pike_string * Only narrow (8 bit) strings.
  • %N: struct pike_string * or NULL Only narrow (8 bit) strings.
  • %t: struct pike_string * Any string width.
  • %T: struct pike_string * or NULL Any string width.
  • %a: struct array *
  • %A: struct array * or NULL
  • %f: float -> FLOAT_TYPE
  • %F: float or int -> FLOAT_TYPE
  • %m: struct mapping *
  • %G: struct mapping * or NULL
  • %u: struct multiset *
  • %U: struct multiset * or NULL
  • %o: struct object *
  • %O: struct object * or NULL
  • %p: struct program *
  • %P: struct program * or NULL
  • %*: struct svalue *

    For compatibility:

    * %S: struct pike_string * Only 8bit strings

  • %W: struct pike_string * Allow wide strings
  • %M: struct multiset *

    A period can be specified between type specifiers to mark the start of optional arguments.


Powered by PikeWiki2

 
gotpike.org | Copyright © 2004 - 2009 | Pike is a trademark of Department of Computer and Information Science, Linköping University