Subido por nrp67363

CALC harbour

Anuncio
* * * * * *
* PROGRAMA:
* FUN€ŽO..:
* AUTOR...:
* * * * * *
calcu()
* * * * * * * * * * * * * *
CALC.PRG
*
CALCULADORA
*
ANDERSON CARDOSO SILVA
*
* * * * * * * * * * * * * *
FUNCTION CALCu()
#INCLUDE "INKEY.CH"
#INCLUDE "MOUSE.CH"
*------------------------*** COMANDO: "BOTAO" - VERSAO CALCULADORA
*** POR....: ANDERSON CARDOSO SILVA
*** DATA...: 09/01/96
#COMMAND @ <XYZlin>,<XYZcol> BOTAO <XYZnome> [SOMBRA <XYZcor>] [MENSAGEM
<XYZmens>] [COM <XYZcor2>] [TECLA <XYtecla>];
=> ;
CBOTAO(<XYZlin>, <XYZcol>, <XYZnome>, <XYZcor>, <XYZmens>, <XYZcor2>,
<XYtecla>)
#COMMAND PRESSIONE <XYZopcao>;
=> ;
<XYZopcao>:=CLEBOTAO(<XYZopcao>)
MR:=ARRAY(4)
aCBOTAOpars:={}
PUBLIC aCBOTAOpars, nBUTTONS, RATO, MR
IF MOUSEINIT(@nBUTTONS)
RATO:=1
ELSE
RATO:=0
ENDIF
*--------------------------OLD=SETCOLOR()
VELHO=SETCURSOR()
SETCURSOR(0)
SET SCOREBOARD OFF
ZX=SAVESCREEN(00,00,24,79)
N:=""; DEC:=3; XX:=40; YY:=10; CA=.T.; OLDXX:=XX; OLDYY:=YY; Z:=1;
RES:=ARRAY(3); RES[1]:=""; RES[2]:=""; RES[3]:=""; OM:=0
PUBLIC N, RES, XX, YY, TEI, TEC, OLDXX, OLDYY, Z, OM
// CARA
BOXSHADOW(YY-2,XX-3,YY+12,XX+29,"W/B")
DISPBOX(YY-2,XX-3,YY+12,XX+29,"ܲÜÛÛÜÛÛ","BG/B")
PLAK(YY-1,XX-1,YY+1,XX+27,"B")
//----SETCOLOR("N/W")
*------DO WHILE CA=.T.
@ YY+2,XX+8 BOTAO " &CE " SOMBRA "N+/B"
@ YY+2,XX+19 BOTAO " &/ " SOMBRA "N+/B"
@ YY+4,XX+24 BOTAO " &* " SOMBRA "N+/B"
@ YY+6,XX+24 BOTAO " &- " SOMBRA "N+/B"
*
@ 14,71 SAY " "
@ YY+8,XX+24 BOTAO " &+ " SOMBRA "N+/B"
*
@ 16,71 SAY " "
*
@ 18,71 SAY " "
@ YY+10,XX+20 BOTAO " &= <Ù " SOMBRA "N+/B"
*
@ 20,70 SAY CHR(27)+"Ù"
@ YY+8,XX-1 BOTAO " F5 " SOMBRA "N+/B" TECLA K_F5
@ YY+8,XX+5 SAY "Mov" COLOR "W+/B"
@ YY+10,XX-1 BOTAO " &S " SOMBRA "N+/B"
@ YY+10,XX+4 SAY "Sai" COLOR "W+/B"
@ YY+4,XX+9 BOTAO " &7 " SOMBRA "N+/B";
@ YY+4 ,XX+14 BOTAO "
SOMBRA "N+/B"; @ YY+4,XX+19 BOTAO " &9 " SOMBRA "N+/B"
@ YY+6,XX+9 BOTAO " &4 " SOMBRA "N+/B";
@ YY+6 ,XX+14 BOTAO "
SOMBRA "N+/B"; @ YY+6,XX+19 BOTAO " &6 " SOMBRA "N+/B"
@ YY+8,XX+9 BOTAO " &1 " SOMBRA "N+/B";
@ YY+8 ,XX+14 BOTAO "
SOMBRA "N+/B"; @ YY+8,XX+19 BOTAO " &3 " SOMBRA "N+/B"
@ YY+10,XX+9 BOTAO " &0 " SOMBRA "N+/B";
@ YY+10,XX+14 BOTAO "
SOMBRA "N+/B"
@ YY+2,XX-1 BOTAO " F2 " SOMBRA "N+/B" TECLA K_F2; @ YY+2 ,XX+5 SAY "a"
"W+/B"; @ YY+2 ,XX+6 SAY "ü" COLOR "R+/B"
@ YY+4,XX-1 BOTAO " F3 " SOMBRA "N+/B" TECLA K_F3; @ YY+4 ,XX+5 SAY "û"
"W+/B"
@ YY+6,XX-1 BOTAO " F4 " SOMBRA "N+/B" TECLA K_F4; @ YY+6 ,XX+5 SAY "%"
"W+/B"
@ YY+2,XX+14 BOTAO " "+CHR(27)+" " SOMBRA "N+/B" TECLA K_BS
PK2:=SAVESCREEN(YY-2,XX-3,YY+12,XX+29)
*-------//
KEYBOARD K_INS; TEC:=6
DO WHILE CA=.T.
IF (OLDXX<>XX .OR. OLDYY<>YY) .OR. (OLDXX<>XX .AND. OLDYY<>YY)
RESTSCREEN(00,00,24,79,ZX)
BOXSHADOW(YY-2,XX-3,YY+12,XX+29,"W/B,N/GR")
RESTSCREEN(YY-2,XX-3,YY+12,XX+29,PK2)
@ YY+08,XX SAY "F5" COLOR "N/W"
OLDXX:=XX; OLDYY:=YY
ENDIF
IF !EMPTY(RES[2])
@ YY,XX SAY IF(VALTYPE(RES[Z])="C", VAL(RES[Z]), RES[Z]) PICT
"9999999999999999999999.9999" COLOR "N/GR"
ELSE
@ YY,XX SAY IF(VALTYPE(RES[1])="C", VAL(RES[1]), RES[1]) PICT
"9999999999999999999999.9999" COLOR "N/GR"
ENDIF
PRESSIONE TEC //; IF VALTYPE(RES)="N"; RES=STR(RES); ENDIF
IF Z=3
Z:=2
ENDIF
IF TEC=6 .AND. EMPTY(RES[2])
EXIT
&8 "
&5 "
&2 "
&. "
COLOR
COLOR
COLOR
ENDIF
DO CASE
CASE TEC=9
RES[Z]:=RES[Z]+"7"
CASE TEC=10
RES[Z]:=RES[Z]+"8"
CASE TEC=11
RES[Z]:=RES[Z]+"9"
CASE TEC=12
RES[Z]:=RES[Z]+"4"
CASE TEC=13
RES[Z]:=RES[Z]+"5"
CASE TEC=14
RES[Z]:=RES[Z]+"6"
CASE TEC=15
RES[Z]:=RES[Z]+"1"
CASE TEC=16
RES[Z]:=RES[Z]+"2"
CASE TEC=17
RES[Z]:=RES[Z]+"3"
CASE TEC=18
RES[Z]:=RES[Z]+"0"
CASE TEC=19
RES[Z]:=RES[Z]+"."
CASE TEC=1
RES[1]:=""
RES[2]:=""
RES[3]:=""
Z:=1
// CE
*----- HABILITACOES DA CALCULADORA
CASE TEC=2
Z:=DIVIDE()
OM:=1
CASE TEC=3
Z:=MULTIPLICA()
OM:=2
CASE TEC=4
Z:=SUBTRAI()
OM:=3
CASE TEC=5
Z:=SOMA()
OM:=4
CASE TEC=20
Z:=EXPOENTE()
OM:=5
CASE TEC=21
Z:=RAIZ()
OM:=6
CASE TEC=22
Z:=PORCENTAGEM()
OM:=7
*----CASE TEC=6
Z:=RESULT()
CASE TEC=23
RES[Z]:=SUBSTR(RES[Z],1,LEN(RES[Z])-1)
CASE TEC=7
MOVE()
CASE TEC=8
SAICALC()
ENDCASE
*
@ YY,XX SAY REPLI(" ",23) COLOR "N/GR"
IF VALTYPE(RES[Z])="C"
@ YY,XX SAY VAL(RES[Z]) PICT "9999999999999999999999.9999" COLOR "N/GR"
ENDIF
IF VALTYPE(RES[Z])="N"
@ YY,XX SAY RES[Z] PICT "9999999999999999999999.9999" COLOR "N/GR"
ENDIF
EXIT
ENDDO
ENDDO
RESTSCREEN(00,00,24,79,ZX); SETCURSOR(VELHO); SETCOLOR(OLD)
RETURN
FUNC SAICALC
CA=.F.; RESTSCREEN(00,00,24,79,ZX)
MOUSEOFF()
RETURN (CA)
FUNC MOVE
@ YY+08,XX SAY "F5" COLOR "N*/W"; MM:={ {}, {}, {}, {} }
PK2:=SAVESCREEN(YY-2,XX-3,YY+12,XX+29)
AA=0
DO WHILE .T.
AA:=INKEY()
MOUSEREAD(MM) // LEFT, RIGHT, ROW, COL
MOUSEON()
OLDXX:=XX; OLDYY:=YY
DO CASE
CASE AA==K_UP
YY-CASE AA==K_DOWN
YY++
CASE AA==K_LEFT
XX-CASE AA==K_RIGHT
XX++
CASE MM[1]==.T. .OR. MM[2]==.T.
IF MM[3]==YY-2 .AND. MM[4]>=XX-3 .AND. MM[4]<=XX+25
MPOSL:=MM[3]; MPOSC:=MM[4]
DO WHILE MM[1]==.T. .OR. MM[2]==.T.
MOUSEREAD(MM)
IF
MM[3]<MPOSL
YY:=YY-(MPOSL-MM[3])
ELSEIF MM[3]>MPOSL
YY:=YY+(MM[3]-MPOSL)
ENDIF
IF
MM[4]<MPOSC
XX:=XX-(MPOSC-MM[4])
ELSEIF MM[4]>MPOSC
XX:=XX+(MM[4]-MPOSC)
ENDIF
IF MM[3]<>MPOSL .OR. MM[4]<>MPOSC .OR. MM[3]<>MPOSL .AND.
MM[4]<>MPOSC
IF (XX-3) <=0 ; XX:=3; ENDIF
IF (XX+29)>=77; XX:=48; ENDIF
IF (YY-2) <=0 ; YY:=2; ENDIF
IF (YY+12)>=24; YY:=12; ENDIF
RESTSCREEN(00,00,24,79,ZX)
BOXSHADOW(YY-2,XX-3,YY+12,XX+29,"W/B")
RESTSCREEN(YY-2,XX-3,YY+12,XX+29,PK2)
MPOSL:=MM[3]; MPOSC:=MM[4]
ENDIF
ENDDO
EXIT
ENDIF
ENDCASE
IF (XX-3) <=0 ; XX=3; ENDIF
IF (XX+29)>=77; XX=48; ENDIF
IF (YY-2) <=0 ; YY=2; ENDIF
IF (YY+12)>=24; YY=12; ENDIF
IF XX<>OLDXX .OR. YY<>OLDYY
RESTSCREEN(00,00,24,79,ZX)
BOXSHADOW(YY-2,XX-3,YY+12,XX+29,"W/B")
RESTSCREEN(YY-2,XX-3,YY+12,XX+29,PK2)
ENDIF
IF AA==K_F5 .OR. AA==K_ESC; @ YY+08,XX SAY "F5" COLOR "N/W"; EXIT; ENDIF
ENDDO
RESTSCREEN(00,00,24,79,ZX)
BOXSHADOW(YY-2,XX-3,YY+12,XX+29,"W/B")
RESTSCREEN(YY-2,XX-3,YY+12,XX+29,PK2)
RETURN
FUNC SOMA()
IF Z=1
Z:=2
RETURN Z
ENDIF
IF Z=2 .AND. !EMPTY(RES[2])
RES[3]:=STR(VAL(RES[1])+VAL(RES[2])) // SOMA
Z:=3
RES[1]:=RES[3]
RES[2]:=""
ELSE
Z := 2
RETURN Z
ENDIF
RETURN Z
FUNC SUBTRAI
IF Z=1
Z:=2
RETURN Z
ENDIF
IF Z=2 .AND. !EMPTY(RES[2])
RES[3]:=STR(VAL(RES[1])-VAL(RES[2])) // SUBTRAI
Z:=3
RES[1]:=RES[3]
RES[2]:=""
ELSE
Z := 2
RETURN Z
ENDIF
RETURN Z
FUNC MULTIPLICA
IF Z=1
Z:=2
RETURN Z
ENDIF
IF Z=2 .AND. !EMPTY(RES[2])
RES[3]:=STR(VAL(RES[1])*VAL(RES[2])) // MULTIPLICA
Z:=3
RES[1]:=RES[3]
RES[2]:=""
ELSE
Z := 2
RETURN Z
ENDIF
RETURN Z
FUNC DIVIDE
IF Z=1
Z:=2
RETURN Z
ENDIF
IF Z=2 .AND. !EMPTY(RES[2])
RES[3]:=STR(VAL(RES[1])/VAL(RES[2])) // DIVIDE
Z:=3
RES[1]:=RES[3]
RES[2]:=""
ELSE
Z := 2
RETURN Z
ENDIF
RETURN Z
FUNC EXPOENTE
IF Z=1
Z:=2
RETURN Z
ENDIF
IF Z=2 .AND. !EMPTY(RES[2])
RES[3]:=STR(VAL(RES[1])**VAL(RES[2])) // EXPOENTE
Z:=3
RES[1]:=RES[3]
RES[2]:=""
ELSE
Z := 2
RETURN Z
ENDIF
RETURN Z
FUNC RAIZ
IF Z=1
Z:=2
RETURN Z
ENDIF
IF Z=2 .AND. !EMPTY(RES[2])
RES[3]:=STR(VAL(RES[1])**1/(VAL(RES[2]))) // RAIZ
Z:=3
RES[1]:=RES[3]
RES[2]:=""
ELSE
Z := 2
RETURN Z
ENDIF
RETURN Z
FUNC PORCENTAGEM
IF Z=1
Z:=2
RETURN Z
ENDIF
IF Z=2 .AND. !EMPTY(RES[2])
RES[3]:=STR(VAL(RES[1])*(VAL(RES[2])/100)) // PORCENTAGEM
Z:=3
RES[1]:=RES[3]
RES[2]:=""
ELSE
Z := 2
RETURN Z
ENDIF
RETURN Z
FUNC RESULT
IF Z=2
DO CASE
CASE OM=1
RES[3]:=STR(VAL(RES[1])/VAL(RES[2])) // DIVIDE
CASE OM=2
RES[3]:=STR(VAL(RES[1])*VAL(RES[2])) // MULTIPLICA
CASE OM=3
RES[3]:=STR(VAL(RES[1])-VAL(RES[2])) // SUBTRAI
CASE OM=4
RES[3]:=STR(VAL(RES[1])+VAL(RES[2])) // SOMA
CASE OM=5
RES[3]:=STR(VAL(RES[1])**VAL(RES[2])) // EXPOENTE
CASE OM=6
RES[3]:=STR(VAL(RES[1])**(1/(VAL(RES[2])))) // RAIZ
CASE OM=7
RES[3]:=STR(VAL(RES[1])*(VAL(RES[2])/100)) // PORCENTAGEM
ENDCASE
Z:=3
RES[1]:=RES[3]
RES[2]:=""
ENDIF
RETURN Z
******************************************************** FIM CALCULADORA
FUNCTION BoxShadow( nTop, nLeft, nBottom, nRight, cCOLOR)
LOCAL nShadTop
LOCAL nShadLeft
LOCAL nShadBottom
LOCAL nShadRight
nShadTop
:= nShadBottom := MIN( nBottom + 1, MAXROW() )
nShadLeft := nLeft + 2
nShadRight := MIN( nRight + 1, MAXCOL() )
// This paints the shadow region by replacing the actual screen color
// attributes with " " (CHR(7), low intensity white on black) which
// gives the illusion of a shadow
RESTSCREEN( nShadTop, nShadLeft, nShadBottom, nShadRight,
TRANSFORM( SAVESCREEN(nShadTop, nShadLeft, nShadBottom, nShadRight),
REPLICATE("X ", nShadRight - nShadLeft + 1 ) ) )
nShadTop
:= nTop + 1
nShadLeft
:= nShadRight := MIN( nRight + 1, MAXCOL() )
nShadBottom := nBottom
RESTSCREEN( nShadTop, nShadLeft, nShadBottom, nShadRight,
TRANSFORM( SAVESCREEN(nShadTop, nShadLeft, nShadBottom, nShadRight),
REPLICATE("X ", nShadBottom - nShadTop + 1 ) ) )
RESTSCREEN( nTop+1, nRight+2, nBottom+1, nRight+2,
;
TRANSFORM( SAVESCREEN(nTop+1, nRight+2, nBottom+1, nRight+2), ;
REPLICATE("X ", nBottom+1 - nTop + 1 ) ) )
SETCOLOR(cCOLOR)
@ nTop, nLeft CLEA TO nBottom, nRight
@ nTop, nLeft TO nBottom, nRight
RETURN ( NIL )
FUNC PLAK(L1,C1,L2,C2,BAC)
OLD=SETCOLOR(); SETCOLOR("N/W"); @ L1,C1 CLEA TO L2,C2
PC1="N+/"+BAC; PC2="R/"+BAC; PC3="R+/"+BAC
@ L1,C1 SAY REPLI("Ü",C2-C1) COLOR PC1
@ L1,C2 SAY "Ü" COLOR PC2; Z=(L2-L1)-1
FOR Y=0 TO Z; @ L1+1+Y,C1 SAY "Û" COLOR PC1; NEXT
FOR Y=0 TO Z; @ L1+1+Y,C2 SAY "Û" COLOR PC3; NEXT
@ L2,C1 SAY REPLI("ß",(C2-C1)+1) COLOR PC3
@ L2,C1 SAY "ß" COLOR PC2; SETCOLOR(OLD)
RETURN
*** FUN€”ES DE BASE DO COMANDO "BOTAO" COM SUPORTE PARA MOUSE (V. CALC.)
*** POR: ANDERSON CARDOSO SILVA
****************
FUNC CBOTAO(MSLN,MSCN,MSNOME,MSCOR,MSMENSAGEM,MSCOR2,MSALT)
MSOLDCOLOR:=SETCOLOR()
IF EMPTY(MSCOR)
MSBAC:=SUBSTR(MSOLDCOLOR,3,2)
IF SUBSTR(MSBAC,2,1)=","
MSBAC:=SUBSTR(MSBAC,1,1)
ENDIF
;
;
;
;
MSCOR:="N/"+MSBAC
ENDIF
IF (MSTECLA:=AT("&",MSNOME))>0
MSNOME:=SUBSTR(MSNOME,1,MSTECLA-1) + SUBSTR(MSNOME,MSTECLA+1)
ENDIF
@ MSLN,MSCN SAY MSNOME COLOR "N/W"// MESSA {||MENSA(MENSAGEM, COR2)}
@ MSLN+1,MSCN+1 SAY REPLI("ß",LEN(MSNOME)) COLOR MSCOR; @
MSLN,MSCN+LEN(MSNOME) SAY "Ü" COLOR MSCOR
AADD(aCBOTAOpars, {MSLN, MSCN, MSNOME, MSCOR, MSMENSAGEM, MSCOR2, MSTECLA,
MSALT})
RETURN
****************
FUNC CLEBOTAO(OPC)
MSOLD:=SETCOLOR()
FOR T=1 TO LEN(aCBOTAOpars)
MSLN
:= aCBOTAOpars[T][1]
MSCN
:= aCBOTAOpars[T][2]
MSNOME
:= aCBOTAOpars[T][3]
MSCOR
:= aCBOTAOpars[T][4]
MSTECLA
:= aCBOTAOpars[T][7]
@ MSLN,MSCN SAY MSNOME COLOR "N/W"
IF !EMPTY(MSTECLA)
MSATALHO:=SUBSTR(MSNOME,MSTECLA,1)
*
@ MSLN,MSCN+MSTECLA-1 SAY MSATALHO COLOR "R+/W"
ENDIF
NEXT
IF EMPTY(OPC); OPC:=1; ENDIF
CURS:=SETCURSOR(); SETCURSOR(0) // SETCOLOR("n/w, N*/w")
R:=OPC; OLDR:=R; CURSOR:=0; MSLN:=aCBOTAOpars[R][1]; MSCN:=aCBOTAOpars[R][2];
MSNOME:=aCBOTAOpars[R][3]; MSTECLA:=aCBOTAOpars[R][7]; MSALT:=aCBOTAOpars[R][8]
DO WHILE CURSOR<>27 .AND. CURSOR<>13 .AND. OLDR=R
@ MSLN,MSCN SAY MSNOME
COLOR "N/W"
IF !EMPTY(MSTECLA)
MSATALHO:=SUBSTR(MSNOME,MSTECLA,1)
*
@ MSLN,MSCN+MSTECLA-1 SAY MSATALHO COLOR "R+/W"
ENDIF
MSLN
MSCN
MSNOME
MSCOR
MSMENSAGEM
MSCOR2
MSTECLA
MSALT
:=
:=
:=
:=
:=
:=
:=
:=
aCBOTAOpars[R][1]
aCBOTAOpars[R][2]
aCBOTAOpars[R][3]
aCBOTAOpars[R][4]
aCBOTAOpars[R][5]
aCBOTAOpars[R][6]
aCBOTAOpars[R][7]
aCBOTAOpars[R][8]
@ MSLN,MSCN SAY MSNOME COLOR "N*/W"
IF EMPTY(MSCOR2); MSCOR2:="B/BG"; ENDIF
IF !EMPTY(MSMENSAGEM)
@ 24,10 SAY MSMENSAGEM+REPLI(" ",69-LEN(MSMENSAGEM)) COLOR MSCOR2
ENDIF
DO WHILE CURSOR<>27 .AND. CURSOR<>13 .AND. OLDR=R
CURSOR:=INKEY() // ********************
OLDR:=R
IF CURSOR==4 .OR. CURSOR==24
IF R<LEN(aCBOTAOpars)
R++
ELSEIF R==LEN(aCBOTAOpars)
IF SET(_SET_WRAP)
R:=1
ENDIF
ENDIF
ELSEIF CURSOR==19 .OR. CURSOR==5
IF R>1
R-ELSEIF R==1
IF SET(_SET_WRAP)
R:=LEN(aCBOTAOpars)
ENDIF
ENDIF
ENDIF
*** TECLA ATALHO ***
// EXPLICITA
IF (ACHOU:=ASCAN(aCBOTAOpars, {|aBOTAO|
UPPER(SUBSTR(aBOTAO[3],aBOTAO[7],1))==UPPER(CHR(CURSOR))})) > 0
R:=ACHOU
ENDIF
// IMPLICITA
IF (ACHOU:=ASCAN(aCBOTAOpars, {|aBOTAO| aBOTAO[8]==CURSOR})) > 0
R:=ACHOU
ENDIF
*** SERVI€O DE MOUSE ***
IF RATO=1
MOUSEON()
MOUSEREAD(MR)
IF (ACHOU:=ASCAN(aCBOTAOPARS, {|aBOTAO| MR[3]==aBOTAO[1] .AND.
MR[4]>=aBOTAO[2] .AND. MR[4]<=(aBOTAO[2]+LEN(aBOTAO[3])) } )) > 0
IF MR[1]=.T. .OR. MR[2]=.T.
CURSOR:=13; R:=ACHOU
ENDIF
*
ELSE
*
IF MR[1]=.T. .OR. MR[2]=.T.
*
R:=0
*
CURSOR:=27
*
ENDIF
ENDIF
ENDIF
IF OLDR<>R; EXIT; ENDIF
ENDDO
ENDDO
*[email protected] MSLN,MSCN SAY MSNOME COLOR "N/W"
MSLN
:= aCBOTAOpars[R][1]
MSCN
MSNOME
MSCOR
MSMENSAGEM
MSCOR2
MSTECLA
MSALT
:=
:=
:=
:=
:=
:=
:=
aCBOTAOpars[R][2]
aCBOTAOpars[R][3]
aCBOTAOpars[R][4]
aCBOTAOpars[R][5]
aCBOTAOpars[R][6]
aCBOTAOpars[R][7]
aCBOTAOpars[R][8]
@ MSLN,MSCN SAY MSNOME COLOR "N*/W"
IF EMPTY(MSCOR2); MSCOR2:="B/BG"; ENDIF
IF !EMPTY(MSMENSAGEM)
@ 24,10 SAY MSMENSAGEM+REPLI(" ",69-LEN(MSMENSAGEM)) COLOR MSCOR2
ENDIF
*-----* IF CURSOR==27
*
R:=0
*
SETCURSOR(CURS)
*
aBOTAOpars:={}; MR:={ {}, {}, {}, {}}
*
IF RATO=1; MOUSEOFF(); ENDIF
*
RETURN R
* ENDIF
B1=SAVESCREEN(MSLN,MSCN,MSLN+1,((MSCN+1)+LEN(MSNOME)))
SETCOLOR(MSCOR)
@ MSLN,MSCN CLEA TO MSLN+1,(MSCN+1)+LEN(MSNOME)
@ MSLN,MSCN+1 SAY MSNOME COLOR "N*/W"
//TONE(130,2)
nKEYPAUSE := 0
nKEYPAUSE := INKEY(.1)
IF nKEYPAUSE # 0
KEYBOARD CHR(nKEYPAUSE)
ENDIF
@ MSLN,MSCN CLEA TO MSLN+1,(MSCN+1)+LEN(MSNOME)
RESTSCREEN(MSLN,MSCN,MSLN+1,((MSCN+1)+LEN(MSNOME)),B1)
//TONE(130,1)
SETCURSOR(CURS)
aCBOTAOpars:={}; MR:={ {}, {}, {}, {} }
IF RATO=1; MOUSEOFF(); ENDIF
RETURN R
Descargar