Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > c64 for arts sake
2005-12-12 17:30
burton1
Account closed

Registered: Dec 2005
Posts: 3
c64 for arts sake

i am using the c64 for an art work which i am making at present, as such i am having to teach myself from scratch to operate and program the c64. i am still struggling with the technical aspects of the project so any help would be muchly appreciated. the project goes a little something like this;
4 c64s are to be networked.
each c64 is to run a program which randomly selects a piece of info from a list (at present i am trying to write this program and utilize the random number generator built into basic however the command which looks a little like this,
1 X=INT(RND(1)*(20-3)+3)
2 GOTO X
3 PRINT"...
4 PRINT"...
does not want to work) and then the data is to be sent over the network to the 4th c64 which compiles the data and prints it out on my printer as well as dropping it into an e-mail which will then be sent out to set addresses.
i am at the moment hoping to build "the final ethernet" from the schematics on the TFE website and use contici as my server and e-mail client.
if anyone has any advise to do with any aspect i would be extremely, extremely grateful.
thanks
2005-12-13 02:00
Krill

Registered: Apr 2002
Posts: 2980
Looks like lots of technical hassles without much gain. Why send random numbers over a network? Why ethernet? Why e-mails? I don't get it. :D
2005-12-13 02:04
VanessaE

Registered: Jan 2005
Posts: 3
The problem here is that C64 BASIC doesn't allow you to use a variable with the GOTO command. Rather, you probably need to use an ON/GOTO command instead. For example, your code would probably read more like this:

1 X=INT(RND(1)*(20-3)+1)
2 ON X GOTO 3,4,5,6,7,...
3 PRINT"...
4 PRINT"...


Alternatively, a better method is to use an array, for example:

10 DIM X$(20)
20 FOR X=1TO20: READ X$(X): NEXT: REM FILL THE ARRAY FIRST
30 :
40 X=INT(RND(1)*20+1): REM NOTE THE CHANGE HERE.
50 PRINT X$(X)
60 ... do whatever else you need, loop, etc.
99 END
1000 DATA "This is the first line to be selected from"
1010 DATA "This is the second..."
1020 DATA "This is the third..."


And so on for however many lines you need to select from.
2005-12-13 02:14
JackAsser

Registered: Jun 2002
Posts: 2014
Hmmm, dim x$(20)? When I did my BASIC twister on LCP I couldn't have more than 10 entries for an array of strings. Is 20 actually possible?
2005-12-13 06:19
ready.

Registered: Feb 2003
Posts: 441
This thread has alread been started as the discussion "Help me create something special!!!".
2005-12-13 07:59
Oswald

Registered: Apr 2002
Posts: 5094
jackasser: ROTFL :) ofcourse c64 basic is not that lame, only the memory limits the arrays :)
2005-12-13 08:33
iopop

Registered: Dec 2001
Posts: 317
Interesting, this thread was also started at lemon64.com. The very same suggestions was made there, ie. ON GOTO and using arrays instead..
2005-12-13 08:34
Slartibartfast
Account closed

Registered: Jul 2002
Posts: 230
Hrm. Seems more like "C64 for insanity's sake".

Burton: You'd be best posting something like this on comp.sys.cbm
2005-12-13 09:05
Graham
Account closed

Registered: Dec 2002
Posts: 990
I remember that in one issue of the 64'er magazine there was a description how to do a GOTO X.
2005-12-13 09:27
JackAsser

Registered: Jun 2002
Posts: 2014
@Oswald: Sorry man, but hey I'm not the BASIC coder, YOU are!! (ProjectOne =) )
2005-12-13 16:12
Oswald

Registered: Apr 2002
Posts: 5094
jackasser: hehe, ok I have to admit, I first learned c64 basic, and been coding stuff in it for years before going for asm.
 
... 6 posts hidden. Click here to view all posts....
 
Previous - 1 | 2 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
danikAdmiral
Sulevi/Virtual Dreams
MWR/Visdom
iAN CooG/HVSC
The Syndrom/TIA/Pret..
Guests online: 117
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 The Demo Coder  (9.6)
6 Edge of Disgrace  (9.6)
7 What Is The Matrix 2  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 No Listen  (9.7)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 X-Mas Demo 2024  (9.5)
7 Dawnfall V1.1  (9.5)
8 Rainbow Connection  (9.5)
9 Onscreen 5k  (9.5)
10 Morph  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Censor Design  (9.3)
5 Triad  (9.3)
Top Diskmag Editors
1 Magic  (9.8)
2 hedning  (9.6)
3 Jazzcat  (9.5)
4 Elwix  (9.1)
5 Remix  (9.1)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.043 sec.