Top Banner
7

Programacion qbasic

Aug 05, 2015

Download

Technology

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Programacion  qbasic
Page 2: Programacion  qbasic

QBASICQBASIC:: Es un entorno de programación constituida Es un entorno de programación constituida por editor que construir el ordenador de una por editor que construir el ordenador de una

maquina de escribir sofisticada maquina de escribir sofisticada

CLS: CLS: Limpiar pantalla Limpiar pantalla

INPUT: INPUT: entradaentrada

REM: REM: Información que deseamos introducirInformación que deseamos introducir

IF THEM: IF THEM: Fin del siFin del si

THEM: THEM: Es una condición Es una condición

Page 3: Programacion  qbasic

LOCALE: LOCALE: Mueve el cursor de la pantalla a la posición Mueve el cursor de la pantalla a la posición especifica especifica

DECLARE: DECLARE: Declara una función o subprograma Declara una función o subprograma

CALL: CALL: Transfiere el control de un procedimiento subTransfiere el control de un procedimiento sub

END: END: Termina el programaTermina el programa

SCREEN: SCREEN: PantallaPantalla

PRINT: PRINT: Texto que desea imprimir Texto que desea imprimir

PSET:PSET:

LINE:LINE:

Page 4: Programacion  qbasic

BF: BF: Numero de color rellenoNumero de color relleno0=0=NEGRONEGRO1=1=AZULAZUL

2=2=VERDEVERDE3=3=CIANCIAN4=4=ROJOROJO

5=5=MAGENTAMAGENTA6=6=AMARILLOAMARILLO

7=7=BLANCO MATEBLANCO MATE8=8=GRISGRIS

9=9=AZUL CLAROAZUL CLARO10=10=VERDE CLAROVERDE CLARO11=11=CIAN CLAROCIAN CLARO12=12=ROJO CLAROROJO CLARO

13=13=MAGENTA CLAROMAGENTA CLARO14=14=AMARILLO CLAROAMARILLO CLARO

15=15=BLANCO BRILLANTEBLANCO BRILLANTE

Page 5: Programacion  qbasic

CASA .BASCASA .BASCLSCLSSCREEN 12SCREEN 12

LINE (10, 200)-(200, 25), 12LINE (10, 200)-(200, 25), 12LINE (200, 25)-(400, 200), 8LINE (200, 25)-(400, 200), 8LINE (10, 200)-(400, 200), 4LINE (10, 200)-(400, 200), 4LINE (10, 200)-(10, 450), 7LINE (10, 200)-(10, 450), 7

LINE (400, 200)-(400, 450), 3LINE (400, 200)-(400, 450), 3LINE (10, 450)-(400, 450), 5LINE (10, 450)-(400, 450), 5

LINE (150, 450)-(150, 300), 2LINE (150, 450)-(150, 300), 2LINE (250, 450)-(250, 300), 9LINE (250, 450)-(250, 300), 9LINE (150, 300)-(250, 300), 6LINE (150, 300)-(250, 300), 6LINE (200, 450)-(200, 300), 13LINE (200, 450)-(200, 300), 13

CIRCLE (550, 100), 22, 14CIRCLE (550, 100), 22, 14PAINT (535, 100), 14, 14PAINT (535, 100), 14, 14CIRCLE (200, 100), 22, 11CIRCLE (200, 100), 22, 11

Page 6: Programacion  qbasic

EL CARROEL CARRO

CLSCLS

SCREEN 12SCREEN 12

LINE (80, 30)-(180, 30), 2LINE (80, 30)-(180, 30), 2

LINE (80, 30)-(80, 80), 3LINE (80, 30)-(80, 80), 3

LINE (80, 80)-(40, 80), 4LINE (80, 80)-(40, 80), 4

LINE (40, 80)-(40, 120), 5LINE (40, 80)-(40, 120), 5

LINE (40, 120)-(180, 120), 6LINE (40, 120)-(180, 120), 6

LINE (180, 120)-(180, 30)LINE (180, 120)-(180, 30)

CIRCLE (55, 120), 5CIRCLE (55, 120), 5

CIRCLE (80, 120), 5CIRCLE (80, 120), 5

CIRCLE (160, 120), 5CIRCLE (160, 120), 5

CIRCLE (140, 120), 5CIRCLE (140, 120), 5

Page 7: Programacion  qbasic

ClsClsScreen 12Screen 12Line (10,160)-(110,160),5Line (10,160)-(110,160),5Line(110,160)-(166,120),6Line(110,160)-(166,120),6Line(10,160)-(60,120),2Line(10,160)-(60,120),2Line(60,120)-(160,120),4Line(60,120)-(160,120),4Line(110,60)-(160,10),7Line(110,60)-(160,10),7Line(160,10)-(60,10),8Line(160,10)-(60,10),8Line(10,60)-(60,10),3Line(10,60)-(60,10),3Line(10,60)-(110,60),11Line(10,60)-(110,60),11Line(160,110)-(160,10),5Line(160,110)-(160,10),5Line(60,120)-(60,10),9Line(60,120)-(60,10),9Line(10,60)-(10,60),10 Line(10,60)-(10,60),10 Line(110,160)-(110,60),12Line(110,160)-(110,60),12