this post was submitted on 31 Aug 2023
41 points (95.6% liked)

retrocomputing

3974 readers
1 users here now

Discussions on vintage and retrocomputing

founded 1 year ago
MODERATORS
 

You are a BASIC bitch, so type-in and share your BASIC listings here. Any and all BASIC dialects are welcome.

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 1 points 11 months ago

Darthmouth GRAFIX.BAS!

100 DEF FNF(X)=SIN(X)
105 DEF FNG(X)=LOG(X)/LOG(10)
110 DEF FNR(X)=INT(X+.5)
120 DEF FNX(X)=INT(100*X+.5)/100
130 READ A,B,S
140 READ C,D,N
150 IF N<=50 THEN 180
160 PRINT "ONLY 50 SUBDIVISIONS"
170 STOP
175 :
180 H=(D-C)/N
190 PRINT ""Y-AXIS FROM ";C;" TO ";D;
195 PRINT " IN INCREMENTS OF ";H
200 PRINT
210 PRINT TAB(8);"'";
220 FOR I=1 TO N-1
230    PRINT "-";
240 NEXT I
250 PRINT "'"
255 :
260 FOR X=A TO B STEP S
270    Y=FNF(X)
272    Y1=8+FNR((Y-C)/H)
274    Y=FNG(X)
276    Y2=8+FNR((Y-C)/H)
278    PRINT FNX(X);
280    IF Y2