text
stringlengths
7
5.36M
DEFINT A-Z 'declare all variables starting with a through z as integers SCREEN 13 'set screen mode 13, 320x200x256 VIEW PRINT 17 TO 25 CLS _FULLSCREEN ' http://www.petesqbsite.com/sections/tutorials/zines/qbtm/5-scripting.html ' Load the Dawnbringer 16 palette PALETTE 0, 459525 PALETTE 1, 854289 PALETTE 2, 1772812...
10 rem this line is numbered 20 gosub my_sub print "this is just a line" end my_sub: print "this will be printed first" return
5 PROC TEST(); BEGIN 10 PROC GCD(); {GCD OF A,B IN B} 20 BEGIN LOOP:IF A<>B THEN 25 BEGIN 30 IF A<B THEN B=B-A 35 ELSE A=A-B END; 40 RETURN B END; 45 ENTER:A=9; B=12; WRHEX(GCD()) 50 END
1 %TITLE "Payroll Deduction Report" %SBTTL "PR_RPRT_TRN_DED_YR" %IDENT "V3.6a Calico" ! ! COPYRIGHT (C) 1986, 1988 BY ! ! Computer Management Center, Inc. ! Idaho Falls, Idaho. ! ! This software is furnished under a license and may be used and ! copied only in accordance with terms of such license and with ...
S1=0 S2=0 V=0 CLS FOR O=1 TO 20 COLOR 0,15 SCREEN 0 LOCATE 2,2 INPUT " SČÍTANEC= " ;S1 LOCATE 23,23 INPUT " " ;K$ IF K$="X" THEN GOTO KONEC LOCATE 3,2 PRINT " + " LOCATE 4,2 ...
#COMPILE EXE #DIM ALL UNION littleEnd bytes(1 TO 4) AS BYTE nbr AS LONG END UNION FUNCTION PBMAIN () AS LONG LOCAL str, temp AS STRING LOCAL lPtr AS LONG LOCAL conv AS LittleEnd OPEN "E:\PowerBasicClassicWindows10\Projects\Utilities\ActiviewTCPClient\TestData.bin" FOR BINARY AS #1 lPtr =...
Version =20 VersionRequired =20 Begin Form RecordSelectors = NotDefault NavigationButtons = NotDefault AllowDesignChanges = NotDefault ScrollBars =2 TabularFamily =0 PictureAlignment =2 DatasheetGridlinesBehavior =3 GridX =24 GridY =24 Width =8220 DatasheetFontHeight =9 ...
1000 REM TREK.BAS 27-JUL-73 ARON K. INSINGA PROJECT DELTA 1001 REM ADAPTADO PARA MC-1000 POR EMERSON J. S. DA COSTA 15-SEP-2011 1002 DEF FN FX(X) = SGN (X) * INT ( ABS (X)): REM FIX(X) 1060 DIM R(9),D$(6),D(6),G(8,8),Q(8,8),K(9,3) 1070 FOR I = 1 TO 6: READ D$(I): NEXT : FOR I = 1 TO 9: READ R(I): NEXT :I ...
RANDOMIZE TIMER DIM h(101, 101) AS INTEGER 'h-höhe des geländes DIM sx(15) AS INTEGER, sy(15) AS INTEGER, sz(15) AS INTEGER, se(15) AS INTEGER, sp(15) AS INTEGER, sn(15) AS STRING 'sx,sy,sz-position 'se-energie sp-aktionspunkte sn-name SCREEN 12 q = 8: d = 4 GOSUB eingabe GOSUB plasma GOSUB posis alive =...
10 REM 'MULTIPLE READ' STATEMENT TEST PROGRAM 20 READ A,B,C 30 D=A+B+C 40 PRINT "D=";D 50 PRINT "THE READ STATEMENT PASSED THE TEST IF D=60" 60 DATA 10,20,30 99 END
OPEN "rrrgggbb.inc" FOR OUTPUT AS #1 PRINT #1, "Palette label near" FOR i = 0 TO 255 r = INT(SQR(INT(i / 32) / 7) * 7 * 9) g = INT(SQR((INT(i / 4) MOD 8) / 7) * 7 * 9) b = INT(SQR((i MOD 4) / 3) * 3 * 21) PRINT #1, " db " + STR$(r) + "," + STR$(g) + "," + STR$(b) + " ; " +...
/' Dialog Example, by fsw compile with: fbc -s gui dialog.rc dialog.bas '/ #Include Once "windows.bi" #Include "AsciiChart.bi" Declare Sub ReLoadAscii(ByVal hWin As HWND, start As ubyte) Declare Sub set_clipboard (Byref x As String) Declare Sub CreatecmdButtons(ByVal hWin As HWND) Declare Function ...
Attribute VB_Name = "StartUpModule" Sub StartUpMainMenu() 'Initiates Basic Things in Main Menu 'Set User Bit (x, Y) in center of Arena UserBitX = UserBitXStart UserBitY = UserBitYStart isExploded = False UserBitXSpeed = 0 UserBitYSpeed = 0 'Resets isSlowMotion = False isD...
PRINT "TAPEZ UN NOMBRE (000-999) "; INPUT Z PRINT "DIFFICULTE (5 A 50) "; INPUT NI PRINT "POSITION EN X "; INPUT X PRINT "POSITION EN Y "; INPUT Y PRINT "DIRECTION: 1=NORD/2=EST/3=SUD/4=OUEST" D = Z F = Z + (1 / Z) C = SQR (Z) Z = F * C Z = TAN (Z) * 100 Z = ABS ( INT (Z) - (Z)) * 100 Z = INT (Z / 10) P...
'String SPacer/delimiter constants 'sp is used as the primary string spacer 'sp2 & sp3 are used when further delimiation is required 'for instance, sp2 is used for embedding spacing info for auto-layout by an IDE DIM SHARED sp AS STRING * 1, sp2 AS STRING * 1, sp3 AS STRING * 1 sp = CHR$(13): sp2 = CHR$(10): sp3 =...
'$include:'lib\spritetop.bi' SCREEN _NEWIMAGE(640, 480, 32) REDIM sheetloc(2, 20) AS STRING OPEN "male.txt" FOR INPUT AS #1 FOR a = 1 TO 20 LINE INPUT #1, sheetloc(1, a) NEXT a CLOSE #1 OPEN "female.txt" FOR INPUT AS #1 FOR a = 1 TO 20 LINE INPUT #1, sheetloc(2, a) NEXT a CLOSE #1 PRINT "loading sheets" REDI...
SCREEN 12 RANDOMIZE TIMER SLEEP DIM smokex(1 TO 500) AS INTEGER DIM smokey(1 TO 500) AS INTEGER DIM smokeage(1 TO 500) AS INTEGER DIM explox(1 TO 50) AS INTEGER DIM exploy(1 TO 50) AS INTEGER DIM explomax(1 TO 50) AS INTEGER DIM exploage(1 TO 50) AS INTEGER DIM rubbx(1 TO 40) AS INTEGER DIM rubby(1 TO 40) AS INTEGER ...
Operation =1 Option =0 Begin InputTables Name ="dbo_ProjectComponentPress" Name ="dbo_ProjectComponentHeader" Name ="dbo_ProjectHeader" Name ="dbo_ContactGeneral" End Begin OutputColumns Expression ="dbo_ProjectComponentPress.ImpoOverride" Expression ="dbo_ProjectComponentPress.SectionName" ...
OPTION EXPLICIT DEFINT A-Z DECLARE FUNCTION Desk.GetDailyTip () AS STRING DECLARE FUNCTION Desk.ProfileSelect () AS STRING DECLARE SUB Conf.Main () DECLARE SUB Desk.AboutBox () DECLARE SUB Desk.DrawDesktop () DECLARE SUB Desk.ExitGUI () DECLARE SUB Desk.LinkDialog (TargetLink%, DidEdit%, NewLink%) DECLARE SU...
10 goto 40 15 let modulus = 1 20 wend : rem while loop exits here when modulus = 0 30 print "line 30": end 40 let i = 10 50 while i < 0 : rem always false 60 print "in while, i= "; i : i = i - 1 70 if (i mod 2) = modulus then 20 80 rem wend : rem while loop exits here when modulus = 1 81 rem ...
10 PRINT "jee" 20 SYS 4096
IF COMMAND$="/?" OR COMMAND$="-?" THEN CLS:GOTO ASKME IF UCASE$(COMMAND$)="/QUICK" THEN QUICK=1 IF UCASE$(COMMAND$)="/NEW" THEN NEWG=1 IF UCASE$(COMMAND$)="/HELP" THEN HELPG=1 CLS ON ERROR GOTO NOFILE OPEN"HOLMES.DAT" FOR INPUT AS #1 ON ERROR GOTO NOFILE INPUT #1,SCR%,PALA%,SND$,GRA$,...
q$ = "Hallo, Wie geht's? " a = 1: s = 1 SCREEN 12 COLOR 15 FOR c = 1 TO LEN(q$) LOCATE 2, c PRINT MID$(q$, c, 1) LOCATE 28, 79 PRINT MID$(q$, c, 1) FOR x = 0 TO 7 d = 0 FOR y = 1 TO 15 IF POINT(x + 624, y + 432) = 15 THEN PSET (a, s + y), 15: d = 1 NEXT y IF d = 1 THEN a = a + 1 NEXT x ...
10 REM ---------------BATAILLE NAVALE---------------- 20 REM --------------------------------- 30 CLS:KEY OFF:SCREEN 1:RANDOMIZE TIMER 40 LINE (20,0)-(222,152),,B 50 FOR I=6 TO 146 STEP 10:FOR J=26 TO 216 STEP 10:CIRCLE (J,I),2:NEXT J,I 60 DIM T(20,15),TT(20,15),C(20),E(2400),F(2400),M(5):Y=2:A$="ABCDE...
10 s=54272 20 for l=0 to 24:poke s+l,0:next 30 poke s+3,8 40 poke s+5,41:poke s+6,89 50 poke s+14,117 60 poke s+18,16 70 poke s+24,143 80 read fr,dr 90 if fr=0 then end 100 poke s+4,65 110 for t=1 to dr*2 120 fq=fr+peek(s+27)/2 130 hf=int(fq/256):lf=fq and 255 140 poke s+0,lf:poke s+1,hf 150 next 160 pok...
DIM SHARED crlf$ DIM SHARED ostype DIM SHARED dq$ DIM SHARED version# crlf$ = CHR$(13) + CHR$(10) ostype = 1 dq$ = CHR$(34) version# = .01 DEFDBL A-Z
'_|_|_| FILECOMP.BAS '_|_|_| A simple program to compare the content of 2 files. '_|_|_| No warrantee or guarantee is given or implied. '_|_|_| Released to PUBLIC DOMAIN by Kurt Kuzba. (8/3/96) DECLARE FUNCTION GetStr$ (Prompt$, L AS INTEGER) F1$ = GetStr$(" First File =>", 32) F2$ = GetStr$("Second ...
10 REM OPERATORE LOGICO 11 : 12 REM ESEMPIO DI INTELLIGENZA ARTIFICIALE BY SANDRO CERTI & FRANCO TOLDI 13 : 14 REM PER QUALSIASI COMMODORE 15 : 20 REM ROUTINE SUPERVISORE 30 CLEAR 200:GOSUB 100:REM INIZIALIZZAZIONE 40 WW=0:GOSUB 220:IF WW THEN 40:REM RICEVE INPUT 50 GOSUB 280:REM SMISTA E ELABORA INPUT 60 IF P=1 THEN G...
1 CLS 2 ASTRING$ = "Hello World!" 3 PRINT "printing "; ASTRING$ 4 END
100 REM GENERATE APRS-IS PASSCODE 110 REM WRITTEN FOR GW-BASIC 120 REM T. DE LELLIS / KN6EI / DL5MGZ 130 REM 140 REM DEFINE SET OF VALID APRS-IS LOGIN CHARACTERS 150 VALID$="-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" 160 REM CONVERT CHARACTER TO UPPERCASE 170 DEF FNU(X)=X-(32*ABS(((X>=97) AND (X<=122)))) 180 REM CH...
10 PRINT NOT 0 20 PRINT NOT -1 30 PRINT NOT 1 40 PRINT NOT "abc"
REM ------------------------------------------------------------ REM PURPOSE: TEST THE PARAMETER RANGE CHECKS REM AUTHOR: HOWARD WULF, AF5NE REM GENERATED: 02/21/2015 14:08:33 REM FILENAME: F_SIN_X_N.BAS REM SYNTAX: N = SIN( X ) REM UNIQUEID: F_SIN_X_N REM FUNCTION: SIN REM REM VARIABLE DESCRIPTION REM I C...
Version =20 VersionRequired =20 Begin Report LayoutForPrint = NotDefault AllowAdditions = NotDefault AllowDesignChanges = NotDefault DefaultView =0 ScrollBars =0 TabularFamily =0 DateGrouping =1 GrpKeepTogether =1 PictureAlignment =2 DatasheetGridlinesBehavior =3 GridX =24 ...
1 'Example of EOF function 10 OPEN "O",11,"TEST1.TXT":'Open the TEST1.TXT file for output; assign file id 11 to it 20 PRINT #11,"This is the 1st line." 30 PRINT #11,"This is the 2nd line." 40 CLOSE 11:'Close the TEST1.TXT file 50 .. 60 OPEN "I",11,"TEST1.TXT":'Open the TEST1.TXT file for input 70 DO 80 INPUT #11,A...
2 rem Relays control program in bwbasic 3.2 4-18-2020 ken.at.github@gmail.com 3 rem 4-18-2020 Added hardware check. Error traps and help. 4 rem As of 4-13-2020 Debian apt get install bwbasic installs an old 2.2. 5 rem Assumes bwbasic 3.2. bwbasic 2.2 has issues see changelog. 6 rem Download bwbasic-...
REM James/8B/10 CLS INPUT "Umur: "; U IF U > 17 THEN PRINT "FILM DAPAT DITONTON" ELSE PRINT "FILM INI TAK PATUT DITONTON OLEH KAMU!!!" END IF END
' ' Ouvrir et refermer une fenątre ' OMIKRON WIND1.BAS ' LIBRARY Gem ,"gem.lib" Appl_Init V_Opnvwk ' Wind_Create(4095,20,20,280,150,Handle%L) IF Handle%L<0 THEN FORM_ALERT (1,"[3][Dāsolā!|Il n'y a plus d'identificateur fenątre libre!][OK]",Ret%L) ELSE Wind_Open(Handle%L,20,20,280,150) ...
0 REM A LOADER FOR IMAGES IN KOALA PAINTER FORMAT 10 TI=0 15 PRINT CHR$(147):INPUT"PICTURE FILE:";A$ 18 IF A$="" THEN A$="TESTIMG2.PIC" 20 GOSUB 20000:GOSUB 10000:TT=TI 30 GETA$:IFA$=""THEN30 40 GOSUB 25000:PRINT"TIME: ";TT:END 10000 LOADA$,8,1,40960 10015 BS=40960:SS=BS+8000:CS=SS+1000:BG=CS+1000 10055 MP=0:MC=0:MS=0:...
SCREEN 9 FOR I% = 1 TO 10 COLOR I% NEXT I% PRINT " SIM ORBIT" PRINT " BY: BEN FRANCK" PRINT PRINT " PRESS ANY KEY TO SEE THE MOON ORBIT THE EARTH " INPUT S$ 1 SCREEN 10 BEEP PRINT PRINT PRINT PRINT PRINT " EEEEE" PRINT...
!- TIC-TAC-TOE-80-128 !- Ported from a QB64 version, !- which was written based on several sources !- !- v 0.1 - 11 June 2021 !- Using the C128's 80 column VDC !- !------------------------------------------------------------------------------- !- !-** Colours in C128 80 column mode !-CONST BLACK ...
10 base_species$ = "Fe(OH)2+" 20 base_species_charge$ = "+" 30 base_ligand$ = "OH-" 40 prefix$ = "Fe" 50 ligand_charge$ = "-" 60 n1 = 6 70 dim ligand$(n1) 80 data "OH","OD","OT","[18O]H","[18O]D","[18O]T" 90 restore 80 100 for i = 1 to n1 110 read ligand$(i) 120 next i 200 for i = 1 to n1 210 for j = i to n1 220 if (i...
SCREEN 13 CLS SHELL "mkdir C:\Progra~1\pcjd14alpha" OPEN "C:\Progra~1\pcjd14alpha\mastercap.dat" FOR BINARY AS #1 IF LOF(1) = 0 THEN CLOSE #1 OPEN "C:\Progra~1\pcjd14alpha\mastercap.dat" FOR OUTPUT AS #1 PRINT "Enter a new master password to login to PassCap with and then restart Passcap" PRINT "Master ...
Hyperion Provider Services - Release 9.3.1.2.00 Build 005 Copyright (c) 1991, 2007 Oracle and / or its affiliates. All rights reserved. connection mode : EMBEDDED essbase.properties: <<>MASK<>>/bin/essbase.properties domain.db location: <<>MASK<>>/data/domain.db console log enable : false file log enable : true logFile...
PRINT "I'm the center of the universe!" SLEEP
100 ' WINDOW sample {DELAY2:2} 110 SCREEN 0,0:CLS 3:C=1 120 VIEW(200,50)-(400,150),,7 130 WINDOW(-100,-100)-(100,100) 140 GOSUB *DRAWING 150 WINDOW(-100,-100)-(0,0) 160 GOSUB *DRAWING 170 WINDOW(0,0)-(100,100) 180 GOSUB *DRAWING 190 WINDOW(-500,-500)-(500,500) 200 GOSUB *DRAWING 210 END 220 *DRAWING 230 CI...
10 print "What is your name, Numb Nutts?" 20 input name$ 30 print "Your name is "; name$; "." 40 input "Right? (y/n)"; true$ 50 if true$="y" then print "good bye!" else print "You're a fibber!"
FUNCTION hexq$ (n~&&) t$ = LCASE$(HEX$(n~&&)) hexq$ = STRING$(16 - LEN(t$), &H30) + t$ END FUNCTION FUNCTION hexp$ (n~%&) t$ = LCASE$(HEX$(n~%&)) hexp$ = STRING$((2 * LEN(n~%&)) - LEN(t$), &H30) + t$ END FUNCTION FUNCTION hexd$ (n~&) t$ = LCASE$(HEX$(n~&)) hexd$ = STRING$(8 - LEN(t$), &H30) + t$ END FUNCTION FUNCTIO...
10 REM TEST SPC() FUNCTION 20 PRINT "START TEST" 40 FOR I% = 10% TO 15% 42 PRINT "X"SPC(I%)"Y" 44 NEXT I% 90 PRINT "END TEST" 99 END
!-------------------------------------------------- !- 27 October 2019 22:22:40 !- Import of : BONES.PRG !- From Disk : c:\users\marka\games\c64\cbmprg\cassette50reboot\oldbones.d64 !- Commodore 64 !-------------------------------------------------- 1 GOSUB3000 10 DATA"{cm +}123456789{cm +}" 20 DATA"1Q{cm +}Q{c...
COMMON x AS INTEGER COMMON y AS INTEGER COMMON d AS INTEGER COMMON SterneNum AS INTEGER COMMON MaxSterne AS INTEGER COMMON e AS INTEGER SCREEN 9 RANDOMIZE TIMER MaxSterne = 50 DIM Sterne(MaxSterne + 1, 3) CLS b1 = 1 SterneNum = 1 Sterne(1, 2) = CINT(350 * RND) Sterne(...
SUB Main() PRINT 12 + 4 PRINT 12 - 4 PRINT 12 * 4 PRINT 12 / 4 'PRINT -4 'PRINT -12 + 4 'PRINT -12 - 4 'PRINT -12 * 4 'PRINT -12 / 4 'PRINT 12 = 4 'PRINT 12 <> 4 'PRINT 12 > 4 'PRINT 12 >= 4 'PRINT 12 < 4 'PRINT 12 <= 4 'PRINT 0 AND 1 'PRINT 1 AND 1 'PRINT 0 OR 1 'PRINT 1 OR 1...
10 PRINT "HELLO!" 20 PRINT "GOING TO RUN A SUB ROUTINE TEN TIMES..." 25 PRINT 30 FOR I=0 TO 9 STEP 1 40 GOSUB 90 50 PRINT I+1 60 NEXT I 64 PRINT 65 PRINT "ALL DONE! GOODBYE!" 70 STOP 80 REM '------SUBROUTINE------ 90 PRINT "HELLO FROM SUBROUTINE!" 100 PRINT "THIS IS ITERATION"; 110 RETURN 120 END
REM @english REM FLOW CONTROL WITH UNCONDITIONAL WAIT REM REM This example will show the use of ''WAIT...MS'' keyword. The main code REM will print an blinking asterisk. Each symbol will last 1000 milliseconds REM on the screen. REM REM @italian REM CONTROLLO DI FLUSSO CON ATTESA INCONDIZIONATA REM REM Questo...
0 R. 0 BACKGROUND=1 1 R. N/A. 2 R. "BACKGROUND" isn't a C64 BASIC command. 3 R. A variable named "BACKGROUND" is never referenced. 10 R. 5 POKE55,255:POKE56,31 11 R. N/A. 12 R. This changes C64 end of BASIC/start of strings to reserve memory for graphics. 13 R. Atari OS/Atari BASIC GRAPHICS command will reserve space...
atom=H contraction shell=S num_primitives=4 num_coefficients=1 0.754732E+02 0.427821E-02 0.113575E+02 0.328672E-01 0.260081E+01 0.159578E+00 0.735503E+00 0.500000E+00 contraction shell=S num_primitives=1 num_coefficients=1 0.231761E+00 1.0000000 contraction shell=S num_primitives=1 num_coefficients=1 0.741675E-01 1.000...
' Computer Player Determining Moves. SUB evaluate (index, x) from = armyloc(index) x = 200: IF aggress! > 1.5 THEN x = 80: IF aggress! > 2 THEN x = 20: IF aggress! > 3 THEN x = 5 CALL void(from, defend): IF defend = 0 THEN x = 0 IF bold > 1 THEN x = .5 * x best = armysize(index) FOR j = 1 TO 6: array(j) = -1 a = matr...
REM --------------------------------------------------- REM REM CUBE.BAS REM REM CALCULATE THE CUBE OF AN USER DEFINED NUMBER REM REM AUTHOR: ANDRE MURTA REM DATE: 20/12/1992 REM REM DEVELOPED AT CENTRO DE ENSINO SUPERIOR DO PARA REM REM --------------------------------------------------- CLS COLOR 2,8 PRINT "Hello wo...
10 REM THIS PROGRAM IS PART 2 OF THE YM2151 TUTORIAL. 100 REM CONFIGURE CHANNEL 0 WAVEFORM: 110 REM SIMPLE SINE WAVE 120 POKE $9FE0, $20: POKE $9FE1, $C7 200 REM CONFIGURE CHANNEL 0 ENVELOPE: 210 REM FAST ATTACK, SLOW DECAY 220 POKE $9FE0, $80: POKE $9FE1, $1F 230 POKE $9FE0, $A0: POKE $9FE1, $0A 240 POKE $9FE0, $E0:...
Operation =1 Option =0 Begin InputTables Name ="dbo_ContactGeneral" Name ="dbo_CompanyEmployee" Name ="dbo_CompanyEmployee" Alias ="dbo_CompanyEmployee_1" End Begin OutputColumns Expression ="dbo_ContactGeneral.CompName" Expression ="dbo_ContactGeneral.SalesRepID" Alias ="SalesRep" Expr...
REM File: .bas REM Data: REM Programmer: Yuriy Lomako REM Description: REM ------------------------------------------------------------------- CLS a$ = "arturo" b$ = "xorxe" c$ = "karlos" PRINT c$; PRINT " drug "; PRINT a$
1 COMMON A, AL, B, BASEONLY, C, C$, C1, CAT$, CC, CKT$, D, D$, DD, DIA, DIMN$, DMS, E, EO, EX$, F, F$, FD, FF, FQ, FRQ, G$, GO$, I, I$, L, LATLONG, LD, LL, LN, LS, LW, LX, MAX, MENU, MIN, MX, N, NN, NT, OV, P, PI, PROG$, Q, QQ, QU, R, RA, RC, T, T$, U, U$, UH, UL$, V$, VC, W, WHIP, WIRD, WW, X, X$, X1, XS, Z$, ZP, ZS 1...
!-------------------------------------------------- !- Saturday, May 20, 2017 1:38:24 AM !- Import of : !- c:\src\zelch128\extras\prg.dating.prg !- Unknown Machine !-------------------------------------------------- 5 D1=26:DIMM1(D1),U2(D1),M2(D1):DP=0:NR%=0:CR$=CHR$(13):PRINT"{clear}{f6}{cyan}Dating subsystem:"...
REM James/8B/10 CLS PRINT " M" SLEEP 2 CLS PRINT " AME" SLEEP 2 CLS PRINT " JAMES" END
1 REM 2 REM INTRODUCTION TO COMPUTER PROGRAMMING BASIC FOR BEGINNERS 3 REM BY USBORNE BOOKS 4 REM https://usborne.com/browse-books/features/computer-and-coding-books/ 5 REM 10 PRINT "WHAT DO YOU WANT FROM THE SHOP" 20 INPUT X$ 30 GOSUB 100 40 PRINT "ANYTHING ELSE" 50 INPUT M$ 60 IF M$="YES" THEN GOTO 10 70 STOP 100 R...
t = TIMER FOR i = 1 TO 1000 a = SIN(1) NEXT t = TIMER - t PRINT t
CLS i = 10 g = 20 b = 20 c = 40 INPUT "Speed of A"; s INPUT "speed of B"; s1 10 i$ = INKEY$ SELECT CASE i$ CASE CHR$(0) + "P": k = s 'cursor down ** CASE CHR$(0) + "H": k = -s 'cursor up ** CASE CHR$(0) + "K": l = -s 'cursor left ** CASE CHR$(0) + "M": l = s 'cursor right** CAS...
10 poke 56333,127:rem irqs off 20 poke 56322,192:rem set pins 6,7 for output 30 poke 56320,128:rem select port 2 (64=port 1) 40 x=peek(54297) 50 y=peek(54298):fb=peek(56320)and 12:rem use 56321 for port 1 60 poke 56322,255:poke 56333,129 100 run
10 REM *** "SECTOR" IS AN AEROSPACE WAR SIMULATION GAME BY: *** 20 REM *** C. F. MOWERY, JR. *** 30 REM *** 13305 S. 26TH AVE. *** 40 REM *** OMAHA, NE 68123 *** 50 REM ******************************************************** ...
Version =20 VersionRequired =20 Begin Form RecordSelectors = NotDefault AutoCenter = NotDefault NavigationButtons = NotDefault DividingLines = NotDefault AllowDesignChanges = NotDefault DefaultView =0 ScrollBars =0 TabularFamily =0 PictureAlignment =2 DatasheetGridlinesBehavior =...
1 GOSUB 20970 2 GO TO 100 4 GO TO 900 5 RETURN 20 CLOSE 1 21 OPEN T$;1,"F",Z$ 22 RETURN 24 FIND 1 25 SAVE 26 RETURN 39 REM ****** SAV PROGRAM ON DRIVE 0 40 CALL "TIME",Z$ 41 Q$=SEG(Z$,4,3) 42 W$=SEG(Z$,1,2) 43 Q$=Q$&W$ 44 Q$=Q$&"/" 45 W$=SEG(Z$,11,2) 46 Q$=Q$&"T" 47 Q$=Q$&W$ 48 Q$="@DRAFTING/"&Q$ 49 CALL "UNIT",0 5...
Operation =1 Option =0 Where ="(((tbl_Locations.Location_type)='Incidental'))" Having ="(((Count(tbl_Events.Event_ID))>1))" Begin InputTables Name ="tbl_Locations" Name ="tbl_Events" Name ="tbl_Sites" Name ="tbl_Rare_Bird_Obs" Name ="tlu_Project_Taxa" End Begin OutputColumns Expression ="tbl_Lo...
// Sprite 0 Hit test, by Bob Rost // Usage: Detect start of vblank, update sprite DMA, name table, // and initial scroll values. Gosub wait_for_sprite_0_hit, which // will return once sprite 0 has hit. Then you may set a new // scroll value, or use it for frame timing. wait_for_sprite_0_hit: set a 0 asm wait_for_s...
1 MODE$="le" 2 LOCATE ,,0 10 CLS:KEY OFF:SCREEN 0,1:WIDTH 80:TALK=0 20 GOSUB 2340:' open title 22 CLS:SCREEN 0,1:WIDTH 80:COLOR 4,7,7:CLS:LOCATE 10,24,0:PRINT "Return to the Earth":COLOR 1:LOCATE 12,30 :PRINT "by Dennis Brown " 24 A$=INKEY$:IF A$="" THEN 24 30 CLS 40 CLS 50 WIDTH 40:COLOR 15,0,0:CLS:LOCATE 1,15,0:PRI...
1 COMMON A, AL, B, BASEONLY, C, C$, C1, CAT$, CC, CKT$, D, D$, DD, DIA, DIMN$, DMS, E, EO, EX$, F, F$, FD, FF, FQ, FRQ, G$, GO$, I, I$, L, LATLONG, LD, LL, LN, LS, LW, LX, MAX, MENU, MIN, MX, N, NN, NT, OV, P, PI, PROG$, Q, QQ, QU, R, RA, RC, T, T$, U, U$, UH, UL$, V$, VC, W, WHIP, WIRD, WW, X, X$, X1, XS, Z$, ZP, ZS 5...
1 option size = (integer long, real gfloat) %include "source:[sb.open]sb_balance.hb" map (sb_balance) sb_balance_cdd sb_balance 100 %include "source:[sb.open]sb_balance.opn" 200 !====================================================================== ! SB_BALANCE file (open read only) !===========================...
1 REM El lenguaje BASIC no tiene clases, pero... 2 PRINT "Lo equivalente sseria hacer algun ciclo con una variable no declarada" 3 REM Asi que lo que hare sera lo siguiente 4 IF Y = 3 THEN 8 5 LET X = 2 6 PRINT "En este caso, se hace un for con una variable que no esta presente" 8 REM Tambien puede aplicar el mandar un...
100 INPUT "ENTER A WORD: "; W$ 110 T = LEN(W$): IF T = 0 THEN 100 120 PRINT "IT'S SPELLED AS FOLLOWS: "; 130 FOR I = 1 TO T 140 L = ASC(MID$(W$,I,1)) - 64 150 IF L < 1 OR L > 26 THEN PRINT "??? "; : GOTO 190 160 FOR J = 1 TO L : READ S$ : NEXT J 170 PRINT S$; " "; 180 RESTORE 190 NEXT I 200 END 1000 DATA AL...
5 poke 53270, peek(53270) or 16 10 for j=1 to 10: c$=c$+"klmn":next 20 c$=left$(c$,39) 30 poke 53265,peek(53265) and 247 40 print "{clear}":for j=1 to 25:print "{down}";:next 50 for j=55296 to 56295:poke j,peek(646):next 60 for j=49152 to 49213:read x:poke j,x:next 70 poke 53265,peek(53265) or 7 100 sys 49152 ...
1 %TITLE "Proto Type a New File" %SBTTL "TK_SPEC_FILEGEN" %IDENT "V3.6a Calico" ! ! COPYRIGHT (C) 1987 BY ! ! Computer Management Center ! Idaho Falls, Idaho. ! ! This software is furnished under a license and may be used and ! copied only in accordance with terms of such license and with ! the inclusion of...
SUB MAIN IF (IsAmbientTemperatureAvailable()) THEN WHILE (TRUE) PRINT getAmbientTemperature() SLEEP 1000 END WHILE ELSE PRINT "Ambient Temperature Sensor is not available on this device" END IF END SUB
1 open 1,8,0,"filename,p" 2 get #1,a$,b$ 3 print asc(a$+chr$(0))+256*asc(b$+chr$(0)) 4 close1
REM JAN MossPOWER *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* SCREEN 12 CLS DIM namen$(100) REM Daten einlesen ---------------------------------------------------------------- RESTORE anfang k = 0: s = 45 'k=Anzahl der Elemente ------------------- READ namen$(k) D...
SUB PropAdd 'MACROMENU Add Custom Properties 'MACROKEY SHIFT+P 'MACRODESCRIPTION Add Custom Properties ' This macro will change all the User to add custom Properties for all selected ' parts on a page. ' ' Creates the dialog box Begin Dialog Visi 0, 0, 180, 145, "Custom Part Property Macro" OkButton 23, 130, 3...
1 SCREEN 13: L = 26: S = 3: CLS : X = 50 + S: Y = 50 + L: N = 1: DATA 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,6,6,6,6,6,6,6,6,6,8,6,8,6,8,6,8,8,8,8,8,4,8,4,8,4,8,6,8,6,8,6,8,8,8,8,8,4,8,4,8,4,8,4,4,4,4,4,4,4,4,4,9 DATA 6,6,6,6,6,6,6,6,6,6,6,6,6,8,8,8,4,8,4,8,8,8,4,8,4,8,4,8,4,8,4,2,4,2,4,2,4,2,4,2,2,2,4,2,4,2,2,2,1...
Auto 1 10 REM \* Snake in the Triangles 20 GO SUB 9000:\ LET hi = 0 30 GO SUB 8000 40 PRINT AT 9,h;" " 50 LET h = h + 2 * (INKEY$="8" AND v<29):\ IF h > 0 THEN LET h = h - 1 54 IF SCREEN$ (10,h) = "" THEN GO TO 1000 55 PRINT AT 9,h; INK 6;"\b";AT 10,h;"\c" 60 PRINT AT 21,0; 70 PRINT TAB INT (RND * 31...
Version =20 VersionRequired =20 Begin Form RecordSelectors = NotDefault MaxButton = NotDefault MinButton = NotDefault ControlBox = NotDefault NavigationButtons = NotDefault CloseButton = NotDefault DividingLines = NotDefault AllowDesignChanges = NotDefault DefaultView =0 ScrollB...
10 CLS 20 PRINT" *************** Reckonmashine ***************" 30 PRINT:PRINT"Welche Rechenart wird gewnscht ???" 40 PRINT:PRINT"+=addition . -=subtraktion . *=multiplikation . /=division . ^=Potenzion" 50 PRINT:PRINT:PRINT"E=Ende" 60 A$=INKEY$:IF A$="+" OR A$="*" THEN GOTO 130 70 IF A$="-" OR A$=...
10 'PROGRAM 6 20 CLS 30 INPUT "WHAT IS THE INTEREST RATE"; INTRATE 40 INPUT "WHAT IS THE INITAL INVESTMENT"; INITALINVESTMENT 50 LET TOTALPROF = INITALINVESTMENT * INTRATE 60 PRINT "YOUR PROFIT IS"; TOTALPROF 70 END
10 PRINT "Gob's Program: Y/N?" 20 INPUT C$ 30 IF C$="y" THEN GOTO 50 40 GOTO 10 50 PRINT "Penus "; 60 GOTO 50
1 'Example of RIGHT$ function 10 A$ = "Hopeful" 20 B$ = RIGHT$(A$,4) 30 PRINT B$
1 CLOCK=0 2 PRINT "Press a key to start" 3 IF INKEY$<>"" THEN RANDOMIZE (CLOCK):CLS:GOTO 10 4 CLOCK = CLOCK+1 5 IF CLOCK >32000 THEN CLS:GOTO 1 6 GOTO 3 10 GOTO 90 90 REM Character setup 91 PLAYNO=9 95 MMC=80:HPC=228:DBC=50:SHC=0:OB1C=65:OBT1C=91:OB2C=65:OBT2C=91 96 FORM=1 100 REM Character setup 103 DIM T(6) 104 CHARA...
REM @english REM I/O CONTROL WITH KEYBOARD (1) REM REM This example will run an endless loop (''DO...LOOP'') than will check if a key is pressed REM by using the ''INKEY$'' function. If a key has been pressed, the program will print the REM message ''"YOU PRESSED A KEY!"''. REM REM @italian REM CONTROLLI DI I/O...
REM \ \****************************************************************************** \****************************************************************************** \*** \*** INVCE OK FILE FUNCTIONS \*** \*** REFERENCE : INVOKFUN.BAS \*** \*** Version A Andrew Wedgeworth ...
' Integration.bas ' 30/01/2002 print "Numerical Integration Calculator" print "-----" print "SmallBASIC Version for Palm OS" print "Developed by: Marc Christian Saribay" print "Date Created: January 30, 2002" print "Last Update: May 19, 2003" print "-----" n="y" repeat 'Function of x func f(x) 'CHANGE THE FUNCTION B...
Option Explicit #Include "..\headers\ll.bi" Sub get_block_fade_input() Dim As Integer ene_ver Dim As String tmp_id Do Locate 66, 86 ? space( 4 ) ScreenSet 0, 0 Locate 66, 86, 1 tmp_id = "" Input "", tmp_id ene_ver = -1 If Val( tmp_id ) < 0 The...
5 ONERRORGOTO900 20 MODE8:DIM:a=0:b=0:c$=CHR$(5) 30 CLS:PRINT"šab a:b:radius"; 40 s$="a":z=a:GOSUB500:a=z 50 s$="b":z=b:GOSUB500:b=z 60 LOCATE0,1:PRINTc$;"Area =";PI*a*b;:z$=INPUT$(1,@):GOTO40 500 LOCATE0,1:PRINTc$;s$;"=";z;"?";:INPUT@42;z:LOCATE0,0:IFz<0 THEN500 ELSERETURN 900 IFERR=1 THENCLS:ONERRORGOTO0 91...
G = 11! CP = 2600! T0 = 403! GX = 45! CPX = 4240! TX0 = 293! KT = 400! F = 70! CLS TX1 = ((GX * CPX * TX0) + ((KT * F * G * CP * T0) / ((G * CP) + (KT * F)))) TX2 = (((GX * CPX) + (KT * F)) - ((KT ^ 2 * F ^ 2) / ((G * CP) + (KT * F)))) TX = TX1 / TX2 TK = ((G * CP * T0) + (KT * F * TX)) / ((G * CP) + ...
10 MODE 1 20 VDU 23,255,255,129,255,255,126,255,255,126 30 DIM HS(6):DIM HSN$(6) 40 DIM BBB(60) 50 DIM L(650) 60 PP=1 70 FOR K=1 TO 650 80 N=RND(3) 90 IF PP=1 THEN N=2 100 IF PP>25 THEN N=1 110 IF N=1 THEN L(K)=PP-1 120 IF N=2 THEN L(K)=PP+1 130 IF N=3 THEN L(K)=PP 140...
!-============================================================================ !-v: the number of verbs !-w: the number of nouns (objects) !-g: the number of "gettable" objects????? !-============================================================================ 5 poke 53280, 11 10 poke 53281, 0 15 print "{light green}" ...
CLS cvetliniy = 6 DIM igrok$(2) FOR z = 1 TO 2 PRINT "Vvedite imya "; z; " igroka" INPUT igrok$(z) NEXT SCREEN 12 FOR hod = 1 TO 64 CLS LINE (200, 50)-(200, 450), cvetliniy LINE (250, 50)-(250, 450), cvetliniy LINE (300, 50)-(300, 450), cvetliniy LINE (350, 50)-(350, 450), cvetliniy LINE (400, 50)-(400, 4...