Page 1 of 1

Function: Separate the integer part of the fractional part

Posted: Sat Aug 16, 2008 3:50 pm
by lrcvs
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

Hmmmmmmmmmm.........

Posted: Sat Aug 16, 2008 5:42 pm
by burger2227

Code: Select all

FUNCTION IntegerOnly% (dec!)
decimal$ = LTRIM$(STR$(dec!))

FOR i = 1 to LEN(decimal$)
     Temp$ = MID$(decimal$, i, 1)
     IF Temp$ = "." THEN EXIT FOR
NEXT

IntegerOnly% = VAL(MID$(decimal$), 1, i - 1)

END FUNCTION 

To Burger 2227: Uuuuuuuuuuuuuuuummmmmmmmmmmmm!!!

Posted: Sat Aug 16, 2008 6:33 pm
by lrcvs
Mr. Burger 2227:

First: No, I acknowledge having read the post you indicated.

Second: My conociments of computer are very low, not anything of "C", "C ++"...

My knowledge is limited to QBasic and other computer languages.

However this function is very simple, is pure coincidence the similarity with the post that you indicate.

Everything you put in posts, are creation itself, is pretty straightforward.

For example, this program and this is mine also in QbasicStation:

This procedure serves to eliminate letters and the decimal point

FUNCTION filtro$ (a$,b$)
'Este procedimiento sirve para eliminar letras y el punto decimal
'Variables:
'a$ : es lo que queremos filtrar
'b$ : es el patron que sirve de filtro
'z$, y$, c$ : acumuladores de caracteres / texto
'a, b : contadores posicionales
FOR a = 1 TO LEN(a$)
FOR b = 1 TO LEN(b$)
z$ = MID$(a$, a, 1)
y$ = MID$(b$, b, 1)
IF r$ = "A" AND ASC(z$) = ASC(y$) THEN c$ = c$ + y$
NEXT b
NEXT a
filtro$ = c$
END FUNCTION

This program you have seen on other occasions and it is made by me, is equally simple, both have the same style.

Greetings from Spain

Here a friend!!!

Uuuuuhhhhhhhhmmmmm

Posted: Sun Aug 17, 2008 8:49 am
by Mentat
lrcvs wrote:Mr. Burger 2227:

First: No, I acknowledge having read the post you indicated.

Second: My conociments of computer are very low, not anything of "C", "C ++"...

My knowledge is limited to QBasic and other computer languages.

However this function is very simple, is pure coincidence the similarity with the post that you indicate.

Everything you put in posts, are creation itself, is pretty straightforward.

For example, this program and this is mine also in QbasicStation:

This procedure serves to eliminate letters and the decimal point

FUNCTION filtro$ (a$,b$)
'Este procedimiento sirve para eliminar letras y el punto decimal
'Variables:
'a$ : es lo que queremos filtrar
'b$ : es el patron que sirve de filtro
'z$, y$, c$ : acumuladores de caracteres / texto
'a, b : contadores posicionales
FOR a = 1 TO LEN(a$)
FOR b = 1 TO LEN(b$)
z$ = MID$(a$, a, 1)
y$ = MID$(b$, b, 1)
IF r$ = "A" AND ASC(z$) = ASC(y$) THEN c$ = c$ + y$
NEXT b
NEXT a
filtro$ = c$
END FUNCTION

This program you have seen on other occasions and it is made by me, is equally simple, both have the same style.

Greetings from Spain

Here a friend!!!
What Mr. Burger wrote was in QB. He just did some cleaning up and put code tags around them.

Likey like this:

Code: Select all

Here be coding dragons

All this by a small and simple program.?

Posted: Sun Aug 17, 2008 11:14 am
by lrcvs
I do not understand :

1?) "Here be coding dragons"

2?) 9 + 9 = 12

3?) "Turn qb upside down and you'll see it"

All this by a small and simple program.?

I'am new here...!!!

Ah! Felicitys to the U.S. for your players of basketball and swimmers at the 2008 Olympics in Beijing.

Also to those of Australia for your swimmer.

Well, greetings.

Re: All this by a small and simple program.?

Posted: Sun Aug 17, 2008 11:23 am
by Mentat
lrcvs wrote:I do not understand :

1?) "Here be coding dragons"

2?) 9 + 9 = 12

3?) "Turn qb upside down and you'll see it"

All this by a small and simple program.?

I'am new here...!!!

Ah! Felicitys to the U.S. for your players of basketball and swimmers at the 2008 Olympics in Beijing.

Also to those of Australia for your swimmer.

Well, greetings.
#1 was a joke. I was just showing how to use code tags, and I had to put something in there. So I used 'coding dragons'. 'Hello world' would have worked too.

#2 & #3 are part of my sig. You make it in your edit-profile page, and the forum automatically includes it at the bottom of all your posts. It's just something you put in that's funny, thought provocative, descriptive about you, or just anything.

O.k.!!!

Posted: Sun Aug 17, 2008 11:45 am
by lrcvs
O.k.

Here a friend!!

Posted: Mon Aug 18, 2008 11:38 pm
by sid6.7
ircvs

anything thats below that thin line near the bottom of a post
is part of a signature and has nothing to do with the rest of a POST...


I.E

its like writing a letter.....

and then signing it "yours truely, ircvs" at the end of your letter

it rarely has anything to do with the current post. ignore them...

I'am very thaknful !!!

Posted: Tue Aug 19, 2008 2:45 am
by lrcvs
Hi, sid6.7 :

I'am very thaknful !!!

Greetings from Spain