Brightsign BrightScript 3.0 Reference Manual Manual de usuario Pagina 51

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 75
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 50
46
Anonymous Functions
A function without a name declaration is considered anonymous.
Example: The following is a simple anonymous function declaration.
myfunc=function (a, b)
Return a+b
end function
print myfunc(1,2)
Example: Anonymous functions can also be used with associative-array literals.
q = {
starring : function(o, e)
str = e.GetBody()
print "Starring: " + str
toks = box(str).tokenize(",")
for each act in tok
actx = box(act).trim()
if actx <> "" then
print "Actor: [" + actx + "]"
o.Actors.Push(actx)
endif
end for
return 0
end function
}
Vista de pagina 50
1 2 ... 46 47 48 49 50 51 52 53 54 55 56 ... 74 75

Comentarios a estos manuales

Sin comentarios