FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Multiplicar Entero y Decimales mismo GET
Posts: 28
Joined: Sun Jan 08, 2012 06:17 PM
Multiplicar Entero y Decimales mismo GET
Posted: Wed Mar 27, 2013 12:26 AM
Tengo que multiplicar el GET mismo un valor con decimales y otro valor entero. Cuando escriba el valor fraccionario y entr贸 en prensa '*' este valor se transfiere a un SAY y el GET debe mantenerse limpio, esperando el valor entero.

El c贸digo que hice fue esto:

Code (fw): Select all Collapse
聽 聽 聽 聽 聽 聽 聽 CASE NKEY = 106
聽 聽 聽 聽 聽 聽 聽 聽 聽 // QDT *
聽 聽 聽 聽 聽 聽 聽 聽 聽 mgetent:=ogetent:oget:buffer
聽 聽 聽 聽 聽 聽 聽 聽 聽 ogetent:varput(mgetent)
聽 聽 聽 聽 聽 聽 聽 聽 聽 cQuantidade:=val(mGetEnt)
聽 聽 聽 聽 聽 聽 聽 聽 聽 oSayVLQuant:refresh()
聽 聽 聽 聽 聽 聽 聽 聽 聽 wValor:=''
聽 聽 聽 聽 聽 聽 聽 聽 聽 mGetEnt:=''
聽 聽 聽 聽 聽 聽 聽 聽 聽 oGetEnt:Varput(mGetEnt)
聽 聽 聽 聽 聽 聽 聽 聽 聽 oGetEnt:Setfocus()
聽 聽 聽 聽 聽 聽 聽 聽 聽 oGetEnt:refresh()
聽 聽 聽 聽 聽 聽 聽 ENDCASE
oGetEnt:Varput(wValor)
oGetEnt:refresh() 聽 聽 聽 聽 聽
oGetEnt:Setpos(Len(mGetEnt))


Tengo 3 problemas con este c贸digo:

1) Los datos que se deben aceptar: ". '*' ',' '0'' 1 ''2'' 3' '4'' 5 ''6'' 7' '8'' 9 '" 驴C贸mo puedo limitar esta entrada?
2) El cursor se encuentra a la izquierda justo cuando puse el 煤ltimo car谩cter tecleado bien?
3) 驴C贸mo puedo declarar una variable num茅rica vac铆a? Si declare mValor: ='' en GET me hace entrar s贸lo 1 car谩cter.

Gracias a todos por la ayuda.

Continue the discussion