text stringlengths 7 5.36M |
|---|
10 max=-99999
20 x = -99999
30 do while x<>-100000
40 if x>max then max=x
50 input "Ingrese un numero: ";x
60 loop
70 print "el numero maximo es: "; max
|
OPTION EXPLICIT
OPTION DEFAULT NONE
OPTION BASE 0
CONST VERSION$ = "0.5"
CONST SELF_EXTRACTOR% = 1
CONST MAX_CHUNK_SIZE% = 128
CONST MAX_NUM_CMDLINE_ARGS% = 20
'ratio vs. speed constant
'the larger this constant, the better the compression
CONST MAXCOMPARES% = 75
'unused entry flag
CONST NIL% = &HFFF... |
10 PRINT " I AM CHIEF NUMBERS FREEK, THE GREAT INDIAN MATH GOD "
20 PRINT "ARE YOU READY TO TAKE THE TEST YOU CALLED ME OUT FOR";
30 INPUT A$
40 IF A$= "YES" THEN 60
50 PRINT "SHUT UP PALEFACE WITH WISE TOUNGE."
60 PRINT " TAKE A NUMBER AND ADD 3. DIVIDE THIS NUMBER BY 5 AND"
70 PRINT "MULTIPLY BY 8. DIVIDE BY 5 AND AD... |
Attribute VB_Name = "LibraryTesting"
' PURPOSE OF THIS MODULE
'
' The purpose of this module is to record unit testing for this library. it
' also serves as examples of how to use the library.
Option Explicit
Option Base 1
'********************************************************************************************
'... |
Attribute VB_Name = "MOD_SetWorkArea"
Option Explicit
'Constants for SystemParametersInfo
Private Const SPI_SETWORKAREA = 47
Private Const SPI_GETWORKAREA = 48
Private Const SPIF_SENDCHANGE = &H2
Public Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type
... |
10 print "*** if-then-else ***"
20 if 1<2 then print "then-zweig" else print "else-Zweig"
30 if 1=2 then print "then-zweig" else print "else-Zweig"
40 print "*** if ohne then/else ***"
50 if 1<2 print "Bedingung ist wahr"
60 if 1=2 print "das darf nicht ausgegeben werden!"
70 print "*** if ohne then aber mit els... |
1 'Example of CD, CHDIR statement
10 CHDIR "C:\HOME\SALES":'Make C:\HOME\SALES current dir
20 A$ = "B:users":'Prepare string variable
30 CD A$:'Use different syntax to change directory
|
10 X$="MSU":Y$="BASIC"
20 ?USING "\\X-&";X$,Y$
|
Version =21
VersionRequired =20
Begin Form
PopUp = NotDefault
Modal = NotDefault
RecordSelectors = NotDefault
NavigationButtons = NotDefault
AllowDeletions = NotDefault
DividingLines = NotDefault
AllowAdditions = NotDefault
DefaultView =0
ScrollBars =0
TabularFamily =127
Pic... |
Attribute VB_Name = "modUSBDetect"
Private Declare Function SetWindowLong _
Lib "User32.dll" _
Alias "SetWindowLongA" (ByVal hWnd As Long, _
ByVal nIndex As Long, _
ByVal dwNewLong As Long) As Long
'The Cal... |
Operation =1
Option =0
Begin InputTables
Name ="qry_NCPN_UTE_Water_Temp"
Name ="qry_NCPN_UTE_pH"
End
Begin OutputColumns
Expression ="qry_NCPN_UTE_Water_Temp.ProjectID"
Expression ="qry_NCPN_UTE_Water_Temp.StationID"
Expression ="qry_NCPN_UTE_Water_Temp.[Station Name]"
Expression ="qry_NCPN_UTE... |
Attribute VB_Name = "Module1"
'Atualização e Desatualização de Lote
Option Explicit
'????Transferir para ErrosContab
Public Const ERRO_LEITURA_LANCAMENTOS9 = 0 'Parametros: lNumIntDocOrigem, iOrigemLcto
'Ocorreu um erro na leitura da tabela de Lançamentos e Visão TransacaoCTBCodigo. NumIntDocOrigem = %l, Origem do La... |
Attribute VB_Name = "modDependencies"
Option Explicit
Option Private Module
'---------------------------------------------------------------------------------------------------------
' Procedure : VStack
' Purpose : Places arrays on top of one another. If the arrays are of unequal width then they will be
' ... |
#REQUIRE "famicom"
INPUT "ROM file? ";rom$
FAMIMOVE PSIZE(0)-256, 0
FAMILOAD rom$
DO
'start screen?
IF FAMIREAD($0770)=0 THEN
inp=16 'start
ELSE
inp=RIGHT
ENDIF
'run?
IF RND(0)>0.2 THEN inp=inp OR 256
FAMINPUT inp
CALL fam(RND(30)+20)
inp=inp AND NOT 16 'release start (if set)
IF RN... |
10 PRINT "PROGRAM FILE 33: EXCEPTION - UNDERFLOW OF"
15 PRINT " NUMERIC EXPRESSIONS."
20 PRINT " ANSI STANDARD 7.4"
30 PRINT
40 PRINT "THIS PROGRAM TESTS VARIOUS CASES OF NUMERIC UNDERFLOW."
50 PRINT
60 PRINT "SECTION 33.1: POSITIVE UNDERFLOW"
70 PRINT
80 PRINT "THIS SECTION TESTS THE RESULT OF EXPRESSION EVA... |
#6
PRINT 1 + 2 + 3
|
atom=H
contraction shell=S num_primitives=1 num_coefficients=1
0.00575 1.0000
contraction shell=P num_primitives=1 num_coefficients=1
0.0210 1.0000
contraction shell=D num_primitives=1 num_coefficients=1
0.0420 1.0000
contraction shell=F num_primitives=1 num_coefficients=1
0.0777 1.0000
contraction shell=G num_primitiv... |
DECLARE SUB MAPCOLOR
DIM SHARED S(100) AS INTEGER
DIM SHARED R(100,100) AS INTEGER
DIM SHARED N AS INTEGER
N=7
DIM A AS INTEGER
DIM B AS INTEGER
DATA 0,1,0,0,0,0,1
DATA 1,0,1,1,1,1,1
DATA 0,1,0,1,0,0,0
DATA 0,1,1,0,1,0,0
DATA 0,1,0,1,0,1,0
DATA 0,1,0,0,1,0,1
DATA 1,1,0,0,0,1,0
FOR A=1 TO N '输入省之间关联
FOR B=1 TO... |
10 REM Ausgabe einer Ascii-Tabelle
20 USING$:CLS
30 FPRINT ' ',:FOR i=0 TO $F:FPRINT MID$(HEX$ i,2);:NEXT
40 FPRINT:FPRINT
50 FOR i=2 TO $F
60 FPRINT MID$(HEX$ i,2),' ';
70 FOR j=0 TO $F
80 FPRINT CHR$(i*16+j);
90 NEXT
100 FPRINT
110 NEXT
120 END
|
PRINT "(C= + Home)GET IT C64 BASIC IN 10 LINES":PRINT "BOTH PLAYERS HAVE 5 COINS":HC=5:CC=5
INPUT "HUMAN INPUT(1-3)"; H:R=RND(1)*2:R=INT(R)+1:IF H=1 THEN GOTO 5
IF H=2 THEN GOTO 6
PRINT "YOU SKIPPED YOUR TURN":GOTO 7
HC=HC+2:CC=CC-2:PRINT"YOU STOLE 2 COINS FROM YOUR C64":GOTO 7
HC=HC+2:PRINT"YOU EARNED 2 COINS"
PRINT "... |
100 ' PAINT sample
110 SCREEN 0,0:CLS 3
120 FOR Y=0 TO 3
130 FOR X=0 TO 7
140 LINE(X*80,Y*50)-STEP(80,50),7,B
150 B$=CHR$(RND*255):R$=CHR$(RND*255)
160 G$=CHR$(RND*255)
170 TILE$=B$+R$+G$
180 PAINT(X*80+40,Y*50+25),TILE$,7
190 NEXT X
200 NEXT Y
210 END
|
REM PROGRAM: COUNT2.BAS
REM DIPPR801 Dataform Program
REM Designed by Andrew W. Loll
REM QBASIC Version 1.00
REM This program counts the number of compounds in my FORTRAN formatted
REM input file.
REM**************************************************************************
CLS
count = 0
comp = 0
vpcount = 0
badch... |
\*****************************************************************************
\*****************************************************************************
\***
\*** FILE HANDLING FUNCTIONS SOURCE CODE
\***
\*** FILE TYPE: KEYED
\***
\*** REFERENCE: CCRSNFUN.BA... |
IF usercommand$(runcommands) = "old" THEN
DO
year1 = VAL(RIGHT$(DATE$, 4))
month1 = VAL(LEFT$(DATE$, 2))
day1 = VAL(MID$(DATE$, 4, 2))
hour1 = VAL(LEFT$(TIME$, 2))
minute1 = VAL(MID$(TIME$, 4, 2))
second1 = VAL(RIGHT$(TIME$, 2))
IF INSTR(useroutputuse$, " you"... |
REM "---------------------------------------"
REM "Prints alphabets from a to z and z to a"
REM "---------------------------------------"
A% = 65
Z% = 90
sa% = 97
sz% = 122
PRINT "Alphabets with their ASCII code"
PRINT
REM "Prints alphabets with their ASCII code from A to Z"
FOR m% = A% TO Z% STEP 1
PRINT CHR$(m... |
$INCLUDE "LOGO.INC"
$INCLUDE "PBWINDOW.INC"
if command$="SKIP" or command$="skip" then goto SkipIt
color 15
Lin=csrlin-1
txt$="proudly presents"
txt$(1)=txt$
gosub WriteText
txt$="The Paintbrush Pick Info Remover"
txt$(2)=txt$
print
Lin=csrlin-1
delay 1
gosub WriteText
delay 1
color 9
Anf... |
10 SCREEN 2:X=15:Y=12
20 A=VPEEK(BASE(5*2+0)+(Y\8)*256+(YMOD8)*32+X) '"Смотрим" Таблицу PNT
30 FOR I=0 TO 7
40 VPOKE(BASE(5*2+2)+(Y\8)*2048+A*8+I),&B11100011 'Формируем "содержимое" квадрата
50 NEXT
60 FOR I=0 TO 7
70 VPOKE(BASE(5*2+1)+(Y\8)*2048+A*8+I),&H8A ' "Раскрасим" квадрат
80 NEXT
90 GOTO 90
|
100 REM Program to demonstrate use of the
110 REM SCREEN function.
120 REM Set text mode screen
130 SCREEN 0,1:COLOR 7,0,0:WIDTH 40:KEY OFF:CLS:LOCATE ,,0
140 REM Draw walls, each in a different color
150 COLOR 1:FOR I=10 TO 30:LOCATE 2,I:PRINT CHR$(219):NEXT
160 COLOR 2:FOR I=10 TO 30:LOCATE 22,I:PRINT CHR$(21... |
DECLARE SUB Intro (platzhalter)
DECLARE SUB Credits (iii, i2)
CALL Intro(platzhalter)
IF platzhalter = 23 THEN time = 29
'Zuordnungen (fest)
LET start1 = 100
LET start2 = 100
LET start3 = 100
LET x = 318
LET y = 300
1 DO
... |
10 REM 'DELETE' TEST PROGRAM
15 delete 40-60
20 PRINT "LINE 20"
30 PRINT "LINE 30"
40 PRINT "LINE 40"
50 PRINT "LINE 50"
60 PRINT "LINE 60"
70 PRINT "LINE 70 - END OF DELETE TEST"
99 END
|
Version =20
VersionRequired =20
PublishOption =1
Checksum =-1975842987
Begin Form
AutoCenter = NotDefault
NavigationButtons = NotDefault
AllowDeletions = NotDefault
DividingLines = NotDefault
AllowDesignChanges = NotDefault
DefaultView =0
ScrollBars =0
PictureAlignment =2
DatasheetG... |
'For CMP 521, July 2006
'This program tells a story of wishful thinking.
'The user inputs two names when prompted and the program displays a short story
'***Variables Used***
'DIM strTeacher$ As String
CLS
PRINT "What is the name of your teacher?"
INPUT strTeacher$ 'this variable holds the name of a teacher.
s... |
1 %TITLE "Convert KingB Floppy Product Files"
%SBTTL "PD_CONV_KINGBFLOPPY"
%IDENT "V3.6a Calico"
!
! COPYRIGHT (C) 1992 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 w... |
DECLARE SUB GUI ()
DECLARE SUB KBR ()
DECLARE SUB READDATA ()
DECLARE SUB INITUNIVERSE ()
DECLARE SUB SIMULATE ()
DECLARE SUB RENDER ()
REM
REM P1X ANSI COLONY SIMULATOR
REM
REM VERSION ALPHA-5
REM
REM KRZYSZTOF JANKOWSKI
REM
REM
SCREEN 9
WIDTH 80, 43
CLS
APPVER$ = "ALPHA-5"
DNAHASH% = TIME
RA... |
REM PROGRAM: COUNT6.BAS
REM DIPPR801 Dataform Program
REM Designed by Andrew W. Loll
REM QBASIC Version 1.00
REM THIS PROGRAM PRINTS ALL OF THE FIRST LINES OF THE CHEMICALS IN MY FORTRAN
REM FORMATTED INPUT FILES SO THAT I CAN SORT THEM IN A DATABASE OR
REM SPREADSHEET.
REM******************************************... |
10 PRINT TAB(50);CHR$(164);" Derik van Z\";CHR$(34);"utphen (jun94)"
20 PRINT "=== Dumping CP/M Tracks to a file ==="
30 PRINT
40 SYMBOL AFTER 256
50 MEMORY &4000
60 DEFINT a-z
70 sector = &4000
80 track = &4001
90 buf = &4002
100 errno = &4004
101 'far address = &4005
102 'rsx name = &4008
110 readsec = &4100
120 POK... |
Version =20
VersionRequired =20
Begin Form
PopUp = NotDefault
DefaultView =0
TabularFamily =0
PictureAlignment =2
DatasheetGridlinesBehavior =3
GridX =24
GridY =24
Width =11175
DatasheetFontHeight =9
ItemSuffix =18
Left =-24060
Top =2175
Right =-22575
Bottom =217... |
10 REM TEST PROGRAM
20 FOR I = 1 TO 4
30 IF MOD(I,2) = 0 THEN 70
40 PRINT I;" IS ODD"
50 NEXT I
60 GOTO 90
70 PRINT I;" IS EVEN"
80 NEXT I
90 END
|
OPTION _EXPLICIT
DIM money AS _FLOAT, tmp$
money = 12345.45
tmp$ = "$$#######,.##"
PRINT "I have this much money!"; USING tmp$; money
PRINT "I have this much money!"; StrUsing(tmp$, money)
FUNCTION StrUsing$ (format$, value##)
DIM prevDest AS LONG, prevSource AS LONG
DIM tempScreen AS LONG
DIM i AS LONG... |
Attribute VB_Name = "mdl北京尚洋"
Option Explicit
'编译常量不能定义成公共的,必须在使用到的地方单独定义,在编译时统一修改
#Const gverControl = 99 ' 0-不支持动态医保(9.19以前),1-支持动态医保无附加参数(9.22以前) , _
2-解决了虚拟结算与正式结算结果不一致;结算作废与原始结算结果不一致;门诊收费死锁的问题;99-所有交易增加附加参数(最新版)
Public gcn尚洋 As New ADODB.Connection, gint适用地区_尚洋 As Integer
Public gint是否职工 As Integer
Private mc... |
Attribute VB_Name = "mResource"
Option Explicit
Private Declare Function EnumResourceLanguages Lib "kernel32" Alias "EnumResourceLanguagesA" (ByVal hModule As Long, ByVal lpType As String, ByVal lpName As String, ByVal lpEnumFunc As Long, ByVal lParam As Long) As Long
Private Declare Function EnumResourceNamesByNum Lib... |
REM ------------------------------
REM "To show numbers from 1 to 100"
REM ------------------------------
'max = 20
PRINT "*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-"
PRINT "This program will print numbers from 1 to the given maximum value"
PRINT "*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-... |
100 clr:a=1:b=8:y=1:dim b$(100)
110 pc=a+b*256:gosub 700:if f=1 then goto 220
120 gosub 730
130 sa=pc:gosub 830:e=peek(pc)
140 if a$="" and (e=0 or e=172 or e=59) then goto 110
150 if a$="" then goto 4690
160 gosub 870:if in<>0 then goto 110
170 pc=sa:gosub 790
180 gosub 970:if g=0 then goto 110
190 d$=a$:gosub 1600
20... |
'Here's my take on the doom.bas program that was posted here a while ago.
'It's much clearer and more organized and a bit faster as well, I think,
'because a lot of unneccessary math has been eliminated.
DECLARE SUB CreateBackground ()
DECLARE SUB GetKeypress (Keycode%)
CONST UpArrow = -72, DnArrow = -8... |
! #############################################
! * This file has several other files combined
! in it, for ease of downloading. Do not edit
! this file, any changes will be overwritten
! * You need one other data file to make this
! program work: jogu_data.txt in the data dir
! ##################################... |
1 'Example of ASC function
10 X$ = "TEST"
20 PRINT ASC(X$):'Prints ASCII for "T"
|
Version =20
VersionRequired =20
Begin Report
LayoutForPrint = NotDefault
DividingLines = NotDefault
AllowDesignChanges = NotDefault
TabularCharSet =161
DateGrouping =1
GrpKeepTogether =1
PictureAlignment =2
DatasheetGridlinesBehavior =3
GridY =10
Width =11184
DatasheetFontHe... |
10 PRINT TAB(33);"KINEMA"
20 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY"
30 PRINT: PRINT: PRINT
100 PRINT
105 PRINT
106 Q=0
110 V=5+INT(35*RND(1))
111 PRINT "A BALL IS THROWN UPWARDS AT";V;"METERS PER SECOND."
112 PRINT
115 A=.05*V^2
116 PRINT "HOW HIGH WILL IT GO (IN METERS)";
117 GOSUB 500
120 A=V/5
12... |
' ********************************************************************
'
' Fitxer....................: DRVS.BAS
' Titol.....................: Modul per el mateniment d'impresores
'
' ********************************************************************
'
' Data inici................: 20/09/1997 2:42:00
' Data de la dar... |
' Character Code List - Hex | IchigoJam BASIC 0.9.8 RC2+
' Copyright (c) 2018 Keiichi Shiga (BALLOON | FU-SEN)
' The MIT License (MIT) - https://mit.balloon.net.eu.org/#2018
10 '·¬×¸À°º°ÄÞ ²Á×Ý 16
20 CLS
30 FOR C=0 TO 255
40 X=C%16:Y=C/16
50 POKE #900+(Y+2)*32+X+2,C
60 NEXT
70 FOR C=0 TO 15
80 LC C+2,0:?HEX$(C)
90 LC C... |
REM com1=760,com2=1016
tapend = 1
blok = 0
lim = 170
asp = .44
tptick = 2
tape.pos = 1
tape.play = 0
tape.stop = 1
tape.rew = 0
tape.ff = 0
tape.rec = 0
DIM cass(1000)
FOR r = 1 TO 1000
cass(r) = 999
NEXT r
connchar = 4
REM 207/209
bco = 1
REM 191,218,196,193
KEY(1) ON
ON KEY(1) GOSUB help
SCREEN ... |
REM @english
REM TEXTS OUTPUT WITH PAPER COLORS (2)
REM
REM This example shows how to use pen colors inside strings. In other words,
REM it is possible to embed an arbitrary number of ''PAPER'' commands inside
REM a string. When the string is printed, the color of the paper will be
REM changed accordingly.
REM
... |
'********** PULLDOWN.BAS - Pulldown menu subprogram with mouse support
'Copyright (c) 1988 Don Malin & Crescent Software
DEFINT A-Z
DECLARE SUB BarPrint (Choice$(), BarColor)
DECLARE SUB ButtonPress (Button, Status, Count, X, Y)
DECLARE SUB GetCursor (X, Y, Button)
DECLARE SUB GetVMode (Mode, Page, PageSize, Rows, ... |
Attribute VB_Name = "Intersection"
Option Explicit
Sub Intersections()
Dim x As Double, y As Double
Dim asr As ShapeRange, sr As ShapeRange
Dim sh As Shape, sh1 As Shape, sh2 As Shape
Dim sp1 As SubPath, sp2 As SubPath
Dim cs As CrossPoints
Dim cp As CrossPoint
Dim i As Integer, j As Integer, k As Integer, l As... |
CLS
INPUT "Введите слово: ", s$
FOR n = 1 TO LEN(s$)
FOR i = 1 TO LEN(s$)
IF LCASE$(MID$(s$, n, 1)) = LCASE$(MID$(s$, i, 1)) AND n <> i THEN
s$ = MID$(s$, 1, i - 1) + MID$(s$, i + 1, LEN(s$))
i = 0
END IF
NEXT
NEXT
PRINT "Символы берутся 1 раз: " + s$
|
'$include:'../../p5js.bas'
'Adapted from https://p5js.org/reference/#/p5/keyIsPressed
FUNCTION p5setup ()
createCanvas 400, 400
END FUNCTION
FUNCTION p5draw ()
backgroundB 200
IF keyIsPressed THEN
fillB 0
strokeB 255
m$ = LTRIM$(STR$(totalKeysDown)) + " key(s) pressed!"
ELSE
... |
10 GOTO 30
20 PRINT "LINE 20"
30 PRINT "LINE 30"
|
10 J = 0
20 PRINT "START"
30 FOR I=0 TO 10000
40 J = J + I * 10
50 NEXT I
60 PRINT J
|
10000 MODE 7
10020 :
10040 PROCinitGrid
10060 :
10080 FOR time%=1 TO 1000
10100 C%=255 : PROCgridFrame
10120 C%=0 : PROCgridFrame
10140 gridx=gridx+0.1243
10160 gridy=gridy+0.242
10180 gridspacing=gridspacing+0.044
10200 gridshear = gridshear + 0.01
10220 NEXT
10240 :
10260 END
10300 REM Grid
10320 :
10340 DEF PRO... |
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
50 INPUT A
60 INPUT B
70 GOSUB 250
80 PRINT "A DIVIDED BY B=";A/B
90 GOTO 50
250 REM SUBROUTINE TO STOP
260 IF A=0 AND B=0 THEN STOP
270 RETURN
|
10 FOR I = 1 TO 10 STEP 1
20 PRINT "WIll show 10 times"
30 NEXT I
|
@ERASE
0 REM BlueSpells Scanner Version 0.1
@INIT 1
0 REM LOAD PARAMETERS
0 REM WILL OVERRIDE DEFAULT VALUES
1 A = load "params.cfg"
0 REM Set LED on
2 A = pioset 20
0 REM Baud rate for serial line
3 A = baud 1152
0 REM SENSOR_ID
4 N = 0
0 REM IS ROOT
5 M = 0
0 REM VERSION
6 V = 1
0 REM INITIALIZED
7 I = 0
0 REM STAT... |
Attribute VB_Name = "mdl山西"
Option Explicit
'EmployeeInfo
Private Type 个人基本信息
个人编号00 As String '01
身份证号01 As String '02
姓名02 As String '03
性别03 As String '04
出生日期04 As String '05
卡号05 As String '06
医疗证号06 As String '07
单位编号07 As String ... |
Version =20
VersionRequired =20
Begin Form
RecordSelectors = NotDefault
NavigationButtons = NotDefault
DividingLines = NotDefault
AllowAdditions = NotDefault
AllowDesignChanges = NotDefault
ScrollBars =2
TabularCharSet =177
PictureAlignment =2
DatasheetGridlinesBehavior =3
GridX... |
DECLARE SUB InputPass ()
DECLARE SUB Password ()
DECLARE SUB Speciale ()
DECLARE SUB Giochi ()
DECLARE SUB Errore ()
DECLARE SUB Guida ()
DECLARE SUB InvioOp ()
DECLARE SUB Page1Up (Text$, Riga!)
DECLARE SUB IScritte (aa!)
DECLARE SUB Sinistra (Alt!, Text$, DisB!)
DECLARE SUB Scritte ()
DECLARE SUB Risposta ... |
10 rem コメント
20 print "hello world"
25 print "hello again"
|
REM "Write a program to check if a given string is PALINDROME"
'ask for input
INPUT "Enter a string"; s$
'remove the space from the given string
without_space$ = strip_space$(s$)
PRINT without_space$
'reverse the given string
backward$ = reverse$(without_space$)
PRINT backward$
CALL print_result(withou... |
1 open 15,8,15,"i":rem initialize diskette
2 open 2,8,2,"program file demo,p,r":rem open prg file for read
3 get#2,x$:rem get file character
4 if st>0 then close 2:end
5 print asc(x$+chr$(0));:rem print ascii value
6 goto 3
|
Attribute VB_Name = "AutoAnalysisProcedures"
Option Explicit
Private Const DATAFILE_LOAD_ERROR_BIT = 1 ' 2^0
Private Const INIFILE_LOAD_ERROR_BIT = 2 ' 2^1
Private Const DATABASE_ERROR_BIT = 4 ' 2^2
Private Const UMC_COUNT_ERROR_BIT = 8 ' 2^3
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
1... |
10 print:print:input"number of items";aa:if aa<2 then 10
15 dim a(aa)
20 print:print"unsorted table":print
30 for z=1 to aa
40 a(z)=int(rnd(1)*100)+1
50 print a(z),
60 next z
70 print:print:print"press s for sort"
80 get k$:if k$<>"s" then 80
90 ti$="000000":gosub 3000:print:print"time:";ti/60;"seconds"
100 print:prin... |
10 SCREEN 12
15 oz = 1
20 a$ = INKEY$
30 IF a$ = CHR$(0) + "M" THEN ox = ox + 1
40 IF a$ = CHR$(0) + "K" THEN ox = ox - 1
50 IF a$ = CHR$(0) + "H" THEN oy = oy + 1
60 IF a$ = CHR$(0) + "P" THEN oy = oy - 1
70 IF a$ = "„" THEN oz = oz + 1
80 IF a$ = "#" THEN oz = oz - 1
85 IF oz = -1 THEN oz = 0
90 LOCATE 1, 1... |
100 printchr$(147):fori=0to6:readw$(i):next
110 input"tt.mm.jjjj";a$
130 t=val(mid$(a$,1,2)):m=val(mid$(a$,4,2)):j=val(mid$(a$,7,4))
160 x=t+m*31-31-int(m*.43)+(m>2)*2+(j-1)*365+int((j+(m<3))/4)
170 x=x+(((j+4)/400=int((j+4)/400))and(m>2))-int((j+104)/100)+int((j+4)/400)
180 y=x-int(x/7)*7
190 print:printw$(y):print:pr... |
#COMPILE EXE
#DIM ALL
#INCLUDE "Win32API.inc"
#INCLUDE ONCE "ExprSolver.inc"
%IDC_TEXTBOX_EXPRESSION = 100
%IDC_TEXTBOX_RESULT = 101
%IDC_LABEL_EXPRESSION = 102
%IDC_LABEL_RESULT = 103
%IDC_LABEL_ERROR = 104
%IDC_LINK_RCHOCKXM = 105
%IDC_LINK_GITHUB = 106
%dGuiWidth = 280
%dGuiHeight = 100
$lpszGithubUrl = "https... |
1 TEXT :
HOME :
NORMAL :
VTAB (5):
HTAB (9):
PRINT "WELCOME, FOOLISH MORTAL":
VTAB (7):
HTAB (14):
PRINT "INTO THE WORLD":
VTAB (9):
HTAB (16):
INVERSE :
PRINT "AKALABETH!":
NORMAL
2 VTAB (11):
HTAB (7):
PRINT "HEREIN THOU SHALT FIND GRAND":
VTAB (13):
HTAB (16):
INVERSE :
PRINT "A... |
SCREEN 12
DIAMETER = 50
CoordinateY = 240
FOR BUILDFIGURE = 1 TO 150
FOR SQUARE = 1 TO DIAMETER
CIRCLE (320, CoordinateY), SQUARE, BUILDFIGURE, , , .3
NEXT SQUARE
CoordinateY = CoordinateY - 1
DIAMETER = DIAMETER - 1 / 3
DELAY .028
NEXT BUILDFIGURE
END
|
DECLARE SUB ENDE ()
DECLARE SUB Bottom ()
DECLARE SUB BottomPressed ()
DIM SHARED InterFeld(0 TO 34) AS INTEGER
DIM SHARED outregbx AS INTEGER
DIM SHARED outregcx AS INTEGER
DIM SHARED outregdx AS INTEGER
DECLARE SUB InitInterrupt ()
DECLARE SUB Interrupt (Nr%, iax%, ibx%, icx%, idx%)
CALL InitInterrupt
CLS
CALL In... |
110 open8, 4:cu$=chr$(145) :cd$=chr$(17)
115 print#8, "graphics mode"
120 print#8, cd$"Spade "cu$"A"
130 print#8, cd$"Heart "cu$"S"
140 print#8, cd$"Diamond "cu$"Z"
150 print#8, cd$"Club "cu$"X"
160 close8
|
REM $option y
LIBRARY "gemaes","gemdos","mint"
DEFINT a-z
REM $include gemaes.bh
REM $include rs_const.bh
DIM SHARED debug
DIM SHARED force
DIM SHARED nobar3d
force=0
debug=0
nobar3d=0
p$=COMMAND$
IF p$<>"" THEN
DO
e=INSTR(p$," ")
IF e>0 THEN name$=LEFT$(p$,e-1) : p$=RIGHT$(p$,LEN(p$)-e) ELSE na... |
CLS
SCREEN 12
RANDOMIZE TIMER
FOR index = 1 TO 100
FOR index2 = 15 TO 30
ran = INT(1 + RND * 15)
CIRCLE (index, index), index, ran
NEXT
NEXT
|
1 'Example of LOC function
10 OPEN "R",11,"TEST.TXT":'Open TEST.TXT for random access
20 FIELD 11,20 AS FNAME$:'Define the fields
30 LINE INPUT "Enter your name";A$
35 LSET FNAME$ = A$:'Left-justify the name
60 PUT 11,1:'Write to record 1
70 DO:PUT 11:LOOP UNTIL LOC(11) = 10
80 CLOSE 11
|
CLS
COLOR 10
PRINT "V„lkommen till Cheops Rum Fuskar Program."
PRINT
PRINT "1. Fuska Till Ett Annat Rum."
PRINT
PRINT "2. ¸terst„ll Den Senaste S„kerhetskopian."
PRINT
PRINT "3. Avsluta."
PRINT
PRINT "V„lj Ett Alternativ: ";
DO
A$ = INKEY$
LOOP UNTIL A$ = "1" OR A$ = "2" OR A$ = "3"
PRINT A$
PRINT
SHE... |
5 rem plots ramdom graphics to the screen
10 print chr$(147);chr$(5)
20 poke 53280,5 : poke 53281,0
30 for n=1 to 1000
40 col=rnd(0)*15
50 x=int(rnd(0)*40)
60 y=int(rnd(0)*23)
70 poke 1024+y*40+x,90+rnd(1)*2 : poke 55296+y*40+x,col
80 next n |
REM Erik Moore
REM tunnel
SCREEN 12
CLS
PRINT "how many"
INPUT many
RANDOMIZE TIMER
rad = 0
FOR times = 1 TO many
CIRCLE (300, 250), rad, (INT(RND * 15) + 1)
CIRCLE (0, 0), rad, (INT(RND * 15) + 1)
CIRCLE (600, 0), rad, (INT(RND * 15) + 1)
CIRCLE (600, 450), rad, (INT(RND * 15) + 1)
CIRCLE (0, 450), rad, (... |
10 REM gunshots
20 FOR x = 1 TO 10
30 SOUND 6, 15; 7, 7; 8, 16; 9, 16; 10, 16; 12, 16; 13, 0
40 PAUSE 5
50 NEXT x
100 REM whistling bomb
110 SOUND 7, 62; 8, 15
120 FOR x = 50 TO 100
130 SOUND 0, x
140 PAUSE 2
150 NEXT x
200 REM explosion
210 SOUND 6, 6; 7, 7; 8, 16; 9, 16; 10, 16; 12, 56;... |
0 REM Reconfiguration Upload Program
0 REM target device: AIRserial4
0 REM defaults setting for mode
0 REM uncomment the one you want to use as default
0 REM service slave
2 1110
0 REM service master 3110
0 REM cable slave 1010
0 REM cable master 3010
0 REM idle 0010
0 REM $3 stores the mode configuration
3 Z
0 REM... |
FUNCTION drawBg%(DIM bgmap%(0, 0), scrw%, scrh%, tilew%, tileh%, xoffset%, LIST<DIM %> bgSprites, numMapEntities%, DIM BgEntityNumSprites%(0), DIM BgEntitySpriteItr%(0), DIM BgEntitySprites%(0, 0), incrBgAnimation%) {
FOR r% = 0 TO scrh% - 1
FOR c% = 0 TO scrw%
cell% = bgmap%(r%, c%)
... |
Attribute VB_Name = "Module2"
Public Const ANAL_OUT = "분석결과.xls"
Public Const ANAL_TITLE = "<통계분석결과>"
'새로운 워크북을 만드는 함수
Public Sub Addbook(szName As String, Optional bMusetNew As Boolean = False) '시트이름을 받는다.
Dim wbNew As Workbook
Dim wbCur() As Workbook
Dim stPath As String
Dim i As Integer
Di... |
' Written by James Albert
' window setup
nomainwin
WindowWidth = 400
WindowHeight = 800
UpperLeftX=600
UpperLeftY=300
'init log prompt
open "log" for text as #log
#log "Liberty BASIC DB"
#log "--------------------------"
WindowWidth = 400
WindowHeight = 100
UpperLeftX=200
UpperLeftY=300
... |
clx=11
clw = 10
clz = 13
CLS
PRINT "This program multiplies complex numbers."
PRINT "Input the coordinates on w in the complex"
PRINT "plane. Then z starts at the origin, and"
PRINT "can change it with the arrow keys."
PRINT " Press F10 to quit."
INPUT "real part of w "; x1
INPUT "imaginary part of w "; y1
... |
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... |
Attribute VB_Name = "Teradata_MOD"
Sub lk()
If Not TDTableExists("dl_oge_analytics.ssn_abc") Then MsgBox "no"
End Sub
Function TDTableExists(tableName) As Boolean
Dim DBCn As ADODB.Connection
Dim DBRs As ADODB.Recordset
On Error GoTo gotError
10 qq = "SELECT TOP 1 * from " & tableName
Debug_Print qq
20... |
Attribute VB_Name = "MOD_IniHandler"
Option Explicit
Declare Function GetPrivateProfileSectionNames Lib _
"kernel32" Alias "GetPrivateProfileSectionNamesA" _
(ByVal lpszReturnBuffer As String, ByVal nSize As _
Long, ByVal lpFileName As String) As Long
Declare Function GetPrivateProfileSe... |
!--------------------------------------------------
!- Saturday, May 20, 2017 1:35:08 AM
!- Import of :
!- c:\src\zelch128\extras\gam.castle.prg
!- Commodore 128 BASIC 7/7.1
!--------------------------------------------------
1 GOTO102
55 A=PEEK(186):OPEN1,A,15,"s0:gam.castle":CLOSE1:SAVE"gam.castle",A
56 END
... |
CLS
SCREEN 13
COLOR 2
PRINT " *** AXIS BENCHMARK *** "
PRINT
COLOR 15
PRINT " made by AS39002 (Mukto) "
PRINT " encoded by QBASIC "
PRINT
COLOR 4
INPUT " < PRESS ENTER TO START >", static$
COLOR 7
GOTO var.load
var.load:
CLS
SCREEN 13
LET time = 0
LET click = 0
LET a ... |
1 %TITLE "Maintenance for Account Mask"
%SBTTL "GL_MAIN_MASK"
%IDENT "V3.6a Calico"
FUNCTION LONG GL_MAIN_MASK(CDD_WINDOW_CDD SMG_WINDOW, LONG MOPTION, &
LONG MLOOP, LONG MFLAG, STRING MVALUE)
!
! COPYRIGHT (C) 1987,1988 BY
!
! Computer Management Center, Inc.
! Idaho Falls, Idaho.
!
! This software is fu... |
10 REM THIS PROGRAM GENERATES A SERIES OF
20 REM DATA POINTS, WITH WHICH THE USER CAN
30 REM PLOT CURVES. THE DATA POINTS GENERATED
40 REM LIE BETWEEN THE VALUES GIVEN FOR X
50 REM IF A STEP SIZE OTHER THAN 1 IS DERIVED
60 REM USE A STEP STATEMENT WITH THE FOR STATEMENTS
70 PRINT "STARTING VALUE OF X = ";
80 INPUT X
90... |
'-------------------------------------------------
'*** PROGRAM: Calculate the area of a triangle..
'*** FORMULA: Area = 1/2 of base * height
'-------------------------------------------------
DO
GOSUB clearScreen
PRINT "PROGRAM: Calculate the area of a triangle"
PRINT
PRINT "FORMULA: Area = 1/2 * base... |
'********** BPRINT.BAS - prints BASIC strings through DOS
'Copyright (C) 1988
DEFINT A-Z
DECLARE SUB BPrint (X$)
DIM FixLen AS STRING * 30
FixLen$ = "This string has a fixed length..." 'dots show how assigning to a
'fixed length string truncates
Normal$ = "This is ... |
1 %TITLE "Post Payroll Accrual Program"
%SBTTL "PR_POST_ACCRUAL"
%IDENT "V3.6a Calico"
!
! COPYRIGHT (C) 1987, 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
! ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.