🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: free.it.visual-basic
Article #523

funzioni

#523
From: riccardo
Date: Sun, 05 Feb 2006 21:14
34 lines
1665 bytes
Salve a tutti.
Ho un problema con le funzioni.
Supponiamo di avere N funzioni del tipo
f1(x,y) , f2(x,y), ........, fN(x,y)  ossia

Function f1(x,y)
  f1=x+sin(x).....
End Function

Function f2(x,y)
  f2=x*sin(x).....
End Function
etc.........

Voglio fare una funzione G  che accetti il nome della funzione ed altri
parametri.
Del tipo G(nome_funzione,x,y)
Qualcuno ha idea come si possa fare una cosa del genere?
in sostanza � possibile passare ad una funzione il nome della funzione?

Siccome non ho idea di come fare....
ho pensato di fare in questo modo alternativo :

Function G(n,x,y)
   If n=1 then  G=f1(x,y)
   If n=2 then  G=f2(x,y)
.........................
   If n=N then  G=fN(x,y)
End Function

Qualcuno ha qualche altra idea?


Grazie.
Technical Details
Message-ID: <43e66a06$0$5982$4fafbaef@reader2.news.tin.it>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news4.google.com!news.glorb.com!feeder.news.tin.it!spool.news.tin.it!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: f94ee,5d444d55fc087a8a,start
X-Google-Attributes: gidf94ee,public
X-Google-Language: ITALIAN,ASCII
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news4.google.com!news.glorb.com!feeder.news.tin.it!spool.news.tin.it!not-for-mail
From: "riccardo" <rmaffei@aliceposta.it>
Newsgroups: free.it.visual-basic
Subject: funzioni
Date: Sun, 5 Feb 2006 22:14:36 +0100
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Lines: 37
Message-ID: <43e66a06$0$5982$4fafbaef@reader2.news.tin.it>
Organization: TIN.IT (http://www.tin.it)
X-Comments: Please send technical notifications to newsmaster@tin.it
NNTP-Posting-Host: 82.51.138.192
X-Trace: 1139173895 reader2.news.tin.it 5982 82.51.138.192:1133
X-Complaints-To: Please send abuse reports to abuse@tin.it