[Jslib] predefined arguments?

Aurélio A. Heckert aurelio@im.ufba.br
Wed, 21 Aug 2002 10:51:40 -0300 (BRT)




Hi!



How can I do a function with predefined arguments?


like:

function test(x=2){ doc.write(" x = "+ x); }
test(1); // write: x = 1

test();  // write: x = 2


// function test(x=2) is wrong... how i do?

thanks (and sory my poor english...)

 Aurium

 



========================================================



  ,           ,



 /             \  Aurélio A. Heckert  [ GNU/Linux!!! ]



((__-^^-,-^^-__))    



 `-_---' `---_-'  Colegiado e Cultura - DACOMP



  `--|o` 'o|--'   Projeto Novas Lentes Para a História



     \  `  /      Integr. GAVRI-IM [Grupo Voluntário]



      ): :(       Integr. Prometeu [Neurônios->Sinapses]



      :o_o:       Compilador: http://www.freepascal.org



       "-"    



--------------------------------------------------------



  Entre para a lista de Pascal da UFBA    :   :   :   :



  Envie um e-mail para:                   :   :   :   :



  pascalufba-subscribe@yahoogroups.com    :   :   :   :



========================================================







"Se conhecimento é poder, que país governado por industriais



dará a verdadeira educação?. Cuidado com o feedback da miséria!"



  Tet Ramon