Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

SHARE WARE NEW MSDOS LANGAUGE SPL SHALL I POST IT TO net.micro.pc?

1 view
Skip to first unread message

Dennis L. Baer

unread,
Oct 16, 1986, 10:17:47 AM10/16/86
to


The Structured Programming Language is a SHARE WARE free format block

structured programming language that runs on MSDOS and PCDOS computer

systems. I would like to know if I should post it on net.micro.pc. If

I receive a positive response from at least FIVE people sending email

to me and NOT the net I will then get permission to place the 5 files

on the net. They will have to be edited to remove simple headers, then

combined together in proper order with cat and then run through uudecode

which will create a file spllib.arc which can then be downloaded to your

IBM compatible computer or AMIGA,MACINTOSH,or ATARI ST with IBM add on.

The file spllib.arc will contain files SP.EXE,SPA.EXE,MANUAL,README.DOC,

IPLOT.SP,IPICDUMP.SP,PICTURE,ERAT.SP,and BLACKJAC.SP. For further info

or questions, you may reach me at 516 694 5872.

Some major features and advantages of SPL

o SPL is an alternative to the PASCAL and C languages

o SPL programs can be run on MACINTOSH,AMIGA,ATARI ST,CP/M

o The SPL processor will run on MSDOS emulators on MACINTOSH,AMIGA,ATARI ST

o PROCEDURES

o WHILE loops

o FOR loops with REAL and INTEGER indicies and increments

o REPEAT loops

o Powerful IF THEN ELSE constructs

o Powerful RANDOM and SEQUENTIAL INPUT/OUTPUT included formatted OUTPUT

o GRAPHICS statements PSET DRAW LINE CIRCLE PRESET SCREEN .....

o BEGIN END blocks

o ERROR trapping

o Statement labels (multiple labels supported)

o Strong data types INTEGER REAL STRING scalars and arrays

o Names of variables and labels up to 40 characters upper and lower case

o Supports mathematical functions SIN COS TAN LOG EXP .....

o STRING functions MID$ LEFT$ RIGHT$ STR$ VAL$ ASC$ .....

o Your compiled BASIC programs do not become obsolete link them together

o SPL programs run faster than PASCAL programs

o SPL programs can take advantage of an entire 640k IBM PC

o The SPL processor will work on an IBM PCjr with 128k and 1 drive

The following is a sample program written in SPL:

BEGIN

COMMENT
This program will plot a set of points in three
dimensions using the high resolution graphics. ;

REAL extent,vx,vy,topx,topy;
REAL ARRAY x(500),y(500),z(500);
INTEGER limit,i;

PROCEDURE Plotter;
BEGIN
COMMENT This procedure scales and plots the points on
the computer screen. ;

INTEGER i;
REAL maxx,maxy,minx,miny,difx,dify;

maxx := -1*10^30; maxy := maxx; minx := 1*10^30; miny := minx;
topx := 639; topy := 200;

FOR i := 1 STEP 1 UNTIL limit DO
BEGIN
IF x(i) >= maxx THEN maxx := x(i);
IF x(i) <= minx THEN minx := x(i);
IF y(i) >= maxy THEN maxy := y(i);
IF y(i) <= miny THEN miny := y(i);
END

COMMENT The maximum and minimum x and y values are computed. ;

difx := maxx-minx; dify := maxy-miny;

FOR i := 1 STEP 1 UNTIL limit DO
BEGIN
x(i) := ((x(i)-minx)/difx)*topx;
y(i) := ((y(i)-miny)/dify)*topy;
PSET(x(i),topy-y(i)),7;
END

END

PROCEDURE Convert_3D_to_2D;
BEGIN

COMMENT This procedure converts 3 dimensional coordinates to
2 dimensional coordinates. ;

REAL cosine_45,sine_45;
INTEGER i;

cosine_45 := COS((45.*3.14159)/180.);
sine_45 := SIN((45.*3.14159)/180.);

FOR i := 1 STEP 1 UNTIL limit DO
BEGIN
x(i) := x(i) + (extent-y(i))*cosine_45;
y(i) := z(i) + (extent-y(i))*sine_45;
END

END

COMMENT This is the start of the main program. ;

HOME; SCREEN 2;

Start_plot:

INPUT('Enter the scale factor:' @ extent); HOME;

OUTPUT('.... WAIT ....');

IF extent < 0 THEN GO Finish;
i:=1;
FOR vx := -1. STEP .1 UNTIL 1. DO
BEGIN
FOR vy := -1. STEP .1 UNTIL 1. DO
BEGIN
x(i) := vx; y(i) := vy; z(i) := SQR(2.-vx^2-vy^2); i := i+1;
END
END

COMMENT Points have been computed,now set up axes. ;

x(i+1) := extent; y(i+1) := 0; z(i+1) := 0;
x(i+2) := -extent; y(i+2) := 0; z(i+2) := 0;
x(i+3) := 0; y(i+3) := extent; z(i+3) := 0;
x(i+4) := 0; y(i+4) := -extent; z(i+4) := 0;
x(i+5) := 0; y(i+5) := 0; z(i+5) := extent;
x(i) := 0; y(i) := 0; z(i) := -extent;
limit := i+5;


Convert_3D_to_2D;

HOME;

Plotter;

OUTPUT( DATE$ + ' ' + TIME$ );

LINE (x(i+1),topy-y(i+1)) - (x(i+2),topy-y(i+2)),7;
LINE (x(i+3),topy-y(i+3)) - (x(i+4),topy-y(i+4)),7;
LINE (x(i),topy-y(i)) - (x(i+5),topy-y(i+5)),7;

Busy: IF INKEY$ = '' THEN GO TO Busy;
ELSE GO TO Start_plot;

Finish:
END

0 new messages