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 / Making your own commands, help needed with dll or with Functions ?

Author
Message
DemonHill
18
Years of Service
User Offline
Joined: 20th Mar 2008
Location:
Posted: 26th Oct 2010 01:41 Edited at: 26th Oct 2010 02:20
I have built up several "commands" that I want to use again and again. I know I can #include them as .dba files, but I want to use them like this..

Screenclear() but without the ()

I understand I have to use the () for a function, would creating a dll allow me to create "Real" commands ?

i.e

Screenclear
ActiveButton

BTW If dll requires C++ skill, then I will stick with Functions
Kevin Picone
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Australia
Posted: 26th Oct 2010 02:56
In order to make a plugin, then you'd need to write this in something other than DBpro. C/C++ , Delphi & PureBasic come to mind.

revenant chaos
DBPro Master
19
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 26th Oct 2010 14:36
Quote: "I understand I have to use the () for a function, would creating a dll allow me to create "Real" commands ?"

Yes.

Quote: "I want to use them like this..
Screenclear() but without the ()"

You can achieve this by using constants to trick the compiler.

baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 26th Oct 2010 14:48
Quote: "You can achieve this by using constants to trick the compiler."

Nice, I didn't know that

French gui
22
Years of Service
User Offline
Joined: 11th May 2004
Location: France
Posted: 26th Oct 2010 20:46
Nice indeed. But I don't understand why this:



isn't read as: PT()"THIS ACTUALLY WORKS!"
but instead: PT("THIS ACTUALLY WORKS!")
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 26th Oct 2010 21:48
Quote: "isn't read as: PT()"THIS ACTUALLY WORKS!""

But it is.

It's the only useful bug that I'm aware of that is in the compiler - See?:


Utility plug-ins (26-JUL-2010)
I'm applying terms of use that require you to wear a red nose and honk a horn whenever you use the Internet
French gui
22
Years of Service
User Offline
Joined: 11th May 2004
Location: France
Posted: 26th Oct 2010 23:14
Please Lee, don't fix this bug...

Login to post a reply

Server time is: 2026-07-22 04:37:07
Your offset time is: 2026-07-22 04:37:07