Posts: 47
Threads: 16
Joined: Apr 2008
FUNCTION enterdec$ (v$, x$)
'Function: Separate the integer part of the fractional part without rounding.
'The X$ must be: E = integer <> D = decimal
'Funcion: Separa la parte entera de la parte decimal sin redondeos
'La x$ tiene que ser: E = entero <>Â D = decimal
x$ = UCASE$(x$)
FOR n = 1 TO LEN(v$)
z$ = MID$(v$, n, 1)
IF z$ = "." THEN w = 1
IF w = 0 THEN ent$ = ent$ + z$: lent = lent + 1
IF w = 1 THEN dec$ = dec$ + z$: ldec = ldec + 1
NEXT n
IF x$ = "E" THEN enterdec$ = ent$
IF x$ = "D" THEN enterdec$ = dec$
END FUNCTION
Posts: 82
Threads: 8
Joined: Oct 2006
You can use the INT function
or
A=B\C
MY
QBASIC'S PAGEÂ Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â I ONLY USE WINDOWS 98SE
Posts: 47
Threads: 16
Joined: Apr 2008
Hi, Opresion:
Very Thanks!
Greeting from Spain
Posts: 82
Threads: 8
Joined: Oct 2006
08-19-2008, 12:44 PM
(This post was last modified: 08-19-2008, 01:03 PM by Opresion.)
(08-19-2008, 12:36 PM)lrcvs link Wrote:Hi, Opresion:
Very Thanks!
Greeting from Spain
Greetings from Mexico.
MY
QBASIC'S PAGEÂ Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â I ONLY USE WINDOWS 98SE
Posts: 47
Threads: 16
Joined: Apr 2008
08-19-2008, 01:06 PM
(This post was last modified: 08-19-2008, 01:09 PM by lrcvs.)
Es bueno saber que hay mas hispanos / latinos que nos gusta Qbasic.
Ya empezaba a preocuparme, si era el unico hispano / latino que le gustase Qbasic.!
En este foro y en Bsic he encontrado muy buenos amigos.
Saludos desde España
.................................................
It's good to know that there are more Hispanis / Latins we like QBasic.
It was beginning to worry about, whether it was the only Hispanis / Latin who likes QBasic.!
In this forum, and BAsic I found very good friends.
Greetings from Spain
Posts: 82
Threads: 8
Joined: Oct 2006
MY
QBASIC'S PAGEÂ Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â I ONLY USE WINDOWS 98SE
Posts: 47
Threads: 16
Joined: Apr 2008
Hello Opresion:
I know that page.
Also I saw your name on several consultations and the pages indicating that know them well.
However, I do not understand really want to say in that post on separate the integer part of the decimal.
Greetins from Spain
Posts: 82
Threads: 8
Joined: Oct 2006
08-20-2008, 03:23 PM
(This post was last modified: 08-20-2008, 03:26 PM by Opresion.)
(08-20-2008, 02:20 PM)lrcvs link Wrote:...I do not understand really want to say in that post on separate the integer part of the decimal.
There is no relation, it's just info.
MY
QBASIC'S PAGEÂ Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â I ONLY USE WINDOWS 98SE
Posts: 47
Threads: 16
Joined: Apr 2008