Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / anyone made a string > float DLL?

Author
Message
pathfinder
22
Years of Service
User Offline
Joined: 5th Sep 2002
Location:
Posted: 6th Feb 2003 13:42
Read float, and val() are still mucking up my decimal places *wink wink lee* so has anyone got so annoyed they made a DLL? youll get a mention in my comp entry, promise
MrTAToad
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 6th Feb 2003 13:55
I can make one if you want... I suspect there may be a long wait to get this fixed, so its a valid request.

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
pathfinder
22
Years of Service
User Offline
Joined: 5th Sep 2002
Location:
Posted: 6th Feb 2003 14:11
hehe your a star, I went to your website an hour ago . Ill credit you

MrTAToad
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 6th Feb 2003 14:30
Well, its not there yet, you know...

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
Shadow Robert
22
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 6th Feb 2003 14:35
making a replacement val() would be simple enough ... and reading would be too as long as you'd be willing to input the position of the file byte

maybe if i was in a programming mood i'd sit here and write what you'd need in your DLL for it - but theres kinda that air sound again when i try to think of coding stuff.

so i'll see about tonight when i have time to actually turn on my brain
by which time no doubt someone will've beat me to it

Tsu'va Oni Ni Jyuuko Fiori Sei Tau!
One block follows the suit ... the whole suit of blocks is the path ... what have you found?
MrTAToad
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 6th Feb 2003 14:37
May be, or may be not...

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
pathfinder
22
Years of Service
User Offline
Joined: 5th Sep 2002
Location:
Posted: 6th Feb 2003 16:27
Ild rather a new val(), pure string to float

MrTAToad
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 6th Feb 2003 16:39
A string to VAL command will be no problem. Reading a float from a file will be harder. I'll let you know when the former has been done.

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
pathfinder
22
Years of Service
User Offline
Joined: 5th Sep 2002
Location:
Posted: 6th Feb 2003 16:52
thanks mate I recon you got yourself a gem there. I needed it because I wrote a lightwave scene exporter but without the decimals it gets a bit hard transfering scale, location, angle, hehe. otherwise it works.

MrTAToad
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 6th Feb 2003 17:24
I dont know whether Lee will be doing a 'proper' float VAL command or not. If so, mine will be temporary.

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
Shadow Robert
22
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 6th Feb 2003 17:27
Toad... for the reading file use a memory pointer and swap the data that way, have the return value what the actual data is - i.e float, dword, word, byte

or you could translate to a string which you use you own VAL command on to make it a value either way is cool

Tsu'va Oni Ni Jyuuko Fiori Sei Tau!
One block follows the suit ... the whole suit of blocks is the path ... what have you found?
pathfinder
22
Years of Service
User Offline
Joined: 5th Sep 2002
Location:
Posted: 6th Feb 2003 18:54
yeah I guess lee is in a catch 22 situation, cant fix somthing without having to leave another part to be fixed later on.

pathfinder
22
Years of Service
User Offline
Joined: 5th Sep 2002
Location:
Posted: 6th Feb 2003 18:56
you see how many people smile when you hand over a working val()

MrTAToad
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 6th Feb 2003 20:40
Okay - the routines will be on my web site very shortly. In order to seperate mine from (possibly Lee's), I've called mine VALD and VALF.

This problem was orginally scheduled to be fixed in Patch 3.2, which, obviosuly, they never bothered with.

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
MrTAToad
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 6th Feb 2003 21:20
And whats the problem with READ FLOAT, by the way ?

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
pathfinder
22
Years of Service
User Offline
Joined: 5th Sep 2002
Location:
Posted: 6th Feb 2003 21:36
the read float If i remember right turned say "100.234" into 56.847E6 or somthing close to that. Thats a very big number

The val() chops off any decimal places no rounding up ie

4.345 is 4

MrTAToad
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 6th Feb 2003 21:50
Yes, the VAL is for integers, hence the need for VALD and VALF

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
MrTAToad
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 6th Feb 2003 21:51
I tried READ and WRITE FLOAT and it did seem okay - what number do you have trouble with ?

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
MrTAToad
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 6th Feb 2003 21:54
So, have you tried the functions yet ?

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
pathfinder
22
Years of Service
User Offline
Joined: 5th Sep 2002
Location:
Posted: 6th Feb 2003 22:30
its in the math.dll right?

MrTAToad
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 6th Feb 2003 22:37
Thats the one.

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
pathfinder
22
Years of Service
User Offline
Joined: 5th Sep 2002
Location:
Posted: 6th Feb 2003 22:52
lol just when you think you can take that noob hat off

is this right?

load dll "Math.dll",1
blah# = call dll (1,"ValF","123.23")
print blah#

pathfinder
22
Years of Service
User Offline
Joined: 5th Sep 2002
Location:
Posted: 6th Feb 2003 22:56
heh do must have got it before you updated k it works

pathfinder
22
Years of Service
User Offline
Joined: 5th Sep 2002
Location:
Posted: 6th Feb 2003 22:58
used this, for anyone whos as mush as a noob to dll as me

load dll "Math.dll",1
a$ = "123.323"
test# = valF(a$)
print test#

pathfinder
22
Years of Service
User Offline
Joined: 5th Sep 2002
Location:
Posted: 6th Feb 2003 22:59
okay MrTAToad might want to tell the USA site cause this has sorted my level importer out totally !!Mega Kudos!!

MrTAToad
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 6th Feb 2003 23:14
I told them a while ago now...

If your using VALF/VALD commands directly, then you dont need the LOAD DLL - you would only use that if you called the C functions...

Glad you like the functions...

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
pathfinder
22
Years of Service
User Offline
Joined: 5th Sep 2002
Location:
Posted: 6th Feb 2003 23:49
love um

MrTAToad
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 7th Feb 2003 00:02
If you like the Math.dll, you might be interested in the Speech.DLL...

Even typing like Amazon.com now

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
pathfinder
22
Years of Service
User Offline
Joined: 5th Sep 2002
Location:
Posted: 7th Feb 2003 11:32
Ill have a good play. Actually my entry does have alot of speech in it. I was going to MP3 it. But to save time I could use your dll in that, then do the MP3's at a later date. hmm

pathfinder
22
Years of Service
User Offline
Joined: 5th Sep 2002
Location:
Posted: 7th Feb 2003 11:42
um it doesnt need anything installed on the users pc does it? Cant use in unless its 100% stand alone

TheCyborg
22
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Denmark
Posted: 7th Feb 2003 11:51
I did a function a little while ago which could convert a string to a real with a precission up to 5 decimals. It could easily be extended to do more decimals, but that would not be necessary because of the inaccurateness of the real.

Try this and see for yourself:
Number#=10.0
Print Str$(Number#)

TheCyborg Development.
http://TheCyborg.Amok.dk
The Ultimate Source To DarkBASIC Programming.
pathfinder
22
Years of Service
User Offline
Joined: 5th Sep 2002
Location:
Posted: 7th Feb 2003 12:14
its was the other way real to string but thanks. MrTAToads dll works fine.

MrTAToad
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 7th Feb 2003 12:37
Patherfinder - I presume your talking about Speech - if so, then the computer that you want the program on has to have Microsoft's SAPI run-time system, otherwise, of course you wont get anything...

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
D Man
22
Years of Service
User Offline
Joined: 3rd Oct 2002
Location: Germany
Posted: 7th Feb 2003 12:41
THX for this dll.
Now I can keep programming without patch 4.

"If you can't make it good
make it look good."
Bill Gates
MrTAToad
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 7th Feb 2003 12:58
Nice! Made two people happy...

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
pathfinder
22
Years of Service
User Offline
Joined: 5th Sep 2002
Location:
Posted: 7th Feb 2003 14:48
see I told you

MrTAToad
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 7th Feb 2003 15:04
Indeed!

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!

Login to post a reply

Server time is: 2025-05-19 06:49:50
Your offset time is: 2025-05-19 06:49:50