Thread View: alt.c64
6 messages
6 total messages
Started by GENE EHRICH
Mon, 02 Aug 1999 00:00
User Defined Functions
Author: GENE EHRICH
Date: Mon, 02 Aug 1999 00:00
Date: Mon, 02 Aug 1999 00:00
13 lines
1575 bytes
1575 bytes
I'm wondering if the Commodore VIC-20 or the Radio Shack MC-10 Color
Computer will accept user-defined functions with more than one argument
similar to the following example:
10 DEF FNF(X,Y)=X^2 + Y^2
20 PRINT FNF(3,4) [should print "25"]
99 END
Please let me know here and at gene@ehrich.com
--
http://members.home.net/generic3
On-Line Computer & Video Game Garage Sale
generic3@home.com
Re: User Defined Functions
Author: Rogelio Perea H.
Date: Wed, 04 Aug 1999 00:00
Date: Wed, 04 Aug 1999 00:00
21 lines
1484 bytes
1484 bytes
"GENE EHRICH" <generic3@home.com> wrote: > I'm wondering if the Commodore VIC-20 or the Radio Shack MC-10 Color > Computer will accept user-defined functions with more than one > argument similar to the following example: > > 10 DEF FNF(X,Y)=X^2 + Y^2 > 20 PRINT FNF(3,4) [should print "25"] > 99 END The MC-10's Micro Color Basic doesn't have support for user defined functions... -- -=-=-=- Rogelio Sent via Deja.com http://www.deja.com/ Share what you know. Learn what you don't.
Re: User Defined Functions
Author: White Flame (aka David Holz)
Date: Wed, 04 Aug 1999 00:00
Date: Wed, 04 Aug 1999 00:00
24 lines
1815 bytes
1815 bytes
GENE EHRICH <generic3@home.com> wrote in message news:tr7p3.37156$YW5.3367@news.rdc1.pa.home.com... > I'm wondering if the Commodore VIC-20 or the Radio Shack MC-10 Color > Computer will accept user-defined functions with more than one argument > similar to the following example: > > 10 DEF FNF(X,Y)=X^2 + Y^2 > 20 PRINT FNF(3,4) [should print "25"] > 99 END > > Please let me know here and at gene@ehrich.com nope, but this would work (and is how I normally do it): 10 DEF FNF(Y)=X^2+Y^2 20 X=3:PRINT FNF(4) 99 END Actually, you could do DEF FNF(QQ)=X^2+Y^2:X=3:Y=4:PRINT FNF(.) Don't know which is faster, but functions can access all global variables. -- White Flame (aka David Holz) http://fly.to/theflame
Re: User Defined Functions
Author: Rogelio Perea H.
Date: Wed, 04 Aug 1999 00:00
Date: Wed, 04 Aug 1999 00:00
21 lines
1570 bytes
1570 bytes
"GENE EHRICH" <generic3@home.com> wrote: > I'm wondering if the Commodore VIC-20 or the Radio Shack MC-10 Color > Computer will accept user-defined functions with more than one > argument similar to the following example: > > 10 DEF FNF(X,Y)=X^2 + Y^2 > 20 PRINT FNF(3,4) [should print "25"] > 99 END The MC-10's Micro Color Basic doesn't have support for user defined functions... -- -=-=-=- Rogelio Sent via Deja.com http://www.deja.com/ Share what you know. Learn what you don't.
Re: User Defined Functions
Author: White Flame (aka David Holz)
Date: Wed, 04 Aug 1999 00:00
Date: Wed, 04 Aug 1999 00:00
24 lines
1897 bytes
1897 bytes
GENE EHRICH <generic3@home.com> wrote in message news:tr7p3.37156$YW5.3367@news.rdc1.pa.home.com... > I'm wondering if the Commodore VIC-20 or the Radio Shack MC-10 Color > Computer will accept user-defined functions with more than one argument > similar to the following example: > > 10 DEF FNF(X,Y)=X^2 + Y^2 > 20 PRINT FNF(3,4) [should print "25"] > 99 END > > Please let me know here and at gene@ehrich.com nope, but this would work (and is how I normally do it): 10 DEF FNF(Y)=X^2+Y^2 20 X=3:PRINT FNF(4) 99 END Actually, you could do DEF FNF(QQ)=X^2+Y^2:X=3:Y=4:PRINT FNF(.) Don't know which is faster, but functions can access all global variables. -- White Flame (aka David Holz) http://fly.to/theflame
Odp: User Defined Functions
Author: Tomasz Berg
Date: Fri, 06 Aug 1999 00:00
Date: Fri, 06 Aug 1999 00:00
29 lines
1940 bytes
1940 bytes
Vic 20 - doesn't accept that instrucions . -- <><><><><><><><><><><><><> Tomasz Berg < Ogion > ICQ UIN 45485534 Commodore 64 is ALIVE ! U�ytkownik GENE EHRICH <generic3@home.com> w wiadomo�ci do grup dyskusyjnych napisa�:tr7p3.37156$YW5.3367@news.rdc1.pa.home.com... : I'm wondering if the Commodore VIC-20 or the Radio Shack MC-10 Color : Computer will accept user-defined functions with more than one argument : similar to the following example: : : 10 DEF FNF(X,Y)=X^2 + Y^2 : 20 PRINT FNF(3,4) [should print "25"] : 99 END : : Please let me know here and at gene@ehrich.com : -- : http://members.home.net/generic3 : On-Line Computer & Video Game Garage Sale : generic3@home.com : :
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads