Xref: utzoo comp.sys.ibm.pc:20230 comp.lang.misc:1989 Path: utzoo!utgpu!water!watmath!clyde!att!icus!noether!mozart!dlbaer From: dlbaer@mozart.UUCP (Dennis L. Baer ) Newsgroups: comp.sys.ibm.pc,comp.lang.misc Subject: Programming Keywords: Programming Message-ID: <339@mozart.UUCP> Date: 12 Oct 88 00:24:12 GMT Organization: Mark Galassi Research Lines: 101 PROGRAMMERS,try the Structured Programming Language and you will have an opportunity to switch to a language that is better than PASCAL and C. It is also an improvement to BASIC but familiar to you if you use BASIC. Why SWITCH to SPL? Here are the reasons! SPL has better and longer variable names. SPL has better PROCEDURES and linkage to assembly language and BASIC. SPL has better INPUT/OUTPUT facilities both random and sequential I/O. SPL has better FOR loops with INTEGER and REAL indicies and increments. SPL has better BLOCK structure. SPL has better GRAPHICS facilities. SPL has better STRING variables and functions. SPL programs are easier to make portable to even non MSDOS machines. SPL runs on ALL MSDOS and PCDOS machines not just PCDOS machines. Another BIG reason: MAKE MONEY DISTRIBUTING SPL. Download file SPL.EXE from 516 935 2027 and call 516 694 5872 during normal business hours for further details or for questions you have. SPL.EXE has the entire Structured Programming Language software package. SPL is by Electronic Digital Computer Systems Company. SPL is easy to learn, use, and combines the BEST of BASIC and PASCAL. Sample SPL program. BEGIN REAL Bb,Aa,Cc; REAL Root_1,Root_2; PROCEDURE Quadratic_roots(Aa,Bb,Cc); BEGIN REAL Factor; Factor:=Bb*Bb-4.*Aa*Cc; IF Factor<0 THEN BEGIN Root_1:=10^(-10); Root_2:=10^(-10); RETURN; END Root_1:=(-Bb+SQR(Factor))/(2.*Aa); Root_2:=(-Bb-SQR(Factor))/(2.*Aa); END REAL Constant_A,Constant_B,Constant_C; Ask_for_quadratic_constants: INPUT('Enter A,B,C:' @ Constant_A,Constant_B,Constant_C); Quadratic_roots(Constant_A,Constant_B,Constant_C); OUTPUT(); OUTPUT(Root_1,Root_2); OUTPUT(); GO Ask_for_quadratic_constants; END Resulting BASIC program that is compiled and run on many systems or translated to C and then compiled as a C program. 2 OPTION BASE 1 3 DIM AZ( 9 ),A%( 1 ),A$( 1 ),B$( 1 ) 503 COMMON AZ(),A%(),A$(),B$() 1001 GOTO 1018 1002 :: 1003 AZ(2)=Z1Z 1004 AZ(1)=Z2Z 1005 AZ(3)=Z3Z 1006 AZ(6)=AZ(1)*AZ(1)-4.*AZ(2)*AZ(3) 1007 IF AZ(6)<0 THEN 1009 1008 GOTO 1013 1009 AZ(4)=10^(-10) 1010 AZ(5)=10^(-10) 1011 RETURN 1012 GOTO 1014 1013 : 1014 : 1015 AZ(4)=(-AZ(1)+SQR(AZ(6)))/(2.*AZ(2)) 1016 AZ(5)=(-AZ(1)-SQR(AZ(6)))/(2.*AZ(2)) 1017 RETURN 1018 : 1019 : 1020 INPUT "Enter A,B,C:";AZ(7),AZ(8),AZ(9) 1021 Z1Z=AZ(7) 1022 Z2Z=AZ(8) 1023 Z3Z=AZ(9) 1024 GOSUB 1002 1025 PRINT 1026 PRINT AZ(4),AZ(5) 1027 PRINT 1028 GOTO 1019