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 / BIGGEST Wish or REQUEST for DarkBasic

Author
Message
Jaze
22
Years of Service
User Offline
Joined: 20th Nov 2003
Location: Connecticut, USA
Posted: 29th Nov 2003 23:04
I REALLY REALLY wish (Aside from object oriented programming model with classes) the ability to be able to DISABLE dynamic declared variables so simple spelling mistakes dont take so much time to find.

For Example: REQUIRE VARIABLE DECLARATION Flag (Default False)

This way any var you use needs to be declared or the compiler would complain that the variable doesn't exist if its not declared as a DIM or GLOBAL or "A as SomeType" or something.

If the language does this now - I could not find the keyword - Can ya help?

Thanx
Jason

-=/Jaze/=-
Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 29th Nov 2003 23:29
No the language doesn't do it now, but it is an excellent suggestion for a compiler improvement.


BLUE GUI Plugin: http://blue.robert-knight.net / BLUE IDE [href]http://blueide.sf.net/ - Replacement editor for DBPro[/href]
CattleRustler
Retired Moderator
22
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 30th Nov 2003 00:05
alot of people have been clamouring for Option Explicit for a while now, maybe it will be included in one of the new IDE's coming down the pipe

-RUST-
Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 30th Nov 2003 00:26
Possibly, but it would be *much* easier for Lee to add it at compiler level, and more reliable, than if an IDE added it at its level. This kind of check is the responsibility of the compiler, not the IDE.

The language may change in a future update, which would break an IDE implementation of Option Explicit.


BLUE GUI Plugin: http://blue.robert-knight.net / BLUE IDE [href]http://blueide.sf.net/ - Replacement editor for DBPro[/href]
OSX Using Happy Dude
22
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 30th Nov 2003 06:50
I suggested something like this ages ago - I might have e-mailed it to Lee to...


Mirrors are more fun than television. Well, that was fun, in a not-so-fun sort of way...
Scraggle
Moderator
23
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 30th Nov 2003 17:14
It sounds like a great idea.

If user input is needed to get its implementation under way then consider this my vote!

GOD exists and his name is Jonny Wilkinson

Kevin Picone
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Australia
Posted: 30th Nov 2003 17:20
Yep, it's trivial for LEE to add. Hence, Play Basic already supports it.

Kevin Picone
Play Basic - Visible Worlds - Kyruss II
[url]www.underwaredesign.com[/url]
JSN
22
Years of Service
User Offline
Joined: 8th Nov 2003
Location: 127.0.0.1
Posted: 30th Nov 2003 18:59
I'd certainly like to see a better MID$ command, rather like...

MID$(string,start,length)

eg

a$="The quick brown fox jumps over the lazy dog"

print mid$(a$,20,5)

Prints "jumps"

-----

~ J ~
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 30th Nov 2003 19:28
A full MID$() already exists as a part of my utility plug-in.

I'd really REALLY like to see OPTION EXPLICIT or equivalent.
Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 30th Nov 2003 20:49
@JSN

Mid$ already has this functionality, it just isn't documented.


BLUE GUI Plugin: http://blue.robert-knight.net / BLUE IDE [href]http://blueide.sf.net/ - Replacement editor for DBPro[/href]
Jaze
22
Years of Service
User Offline
Joined: 20th Nov 2003
Location: Connecticut, USA
Posted: 30th Nov 2003 20:55
Are you serious??? You mean the Mid$ isn't string, start, length? That command is as old as basic itself - but it works different in DBPro.... Caveats.

Well...

-=/Jaze/=-
Jaze
22
Years of Service
User Offline
Joined: 20th Nov 2003
Location: Connecticut, USA
Posted: 30th Nov 2003 20:57
He typed that message whilist I left the room - Cool...third param not documented - Cool beans ... I heard kind words about my music

-=/Jaze/=-
JSN
22
Years of Service
User Offline
Joined: 8th Nov 2003
Location: 127.0.0.1
Posted: 30th Nov 2003 21:00
ang on ang on...

I've just tried using this and I'm getting an error.

IF it's not documented, then does anyone have an example to show...?

-----

~ J ~
Nightman
23
Years of Service
User Offline
Joined: 11th May 2003
Location: Australia
Posted: 30th Nov 2003 23:59
OPTION EXPLICIT: I Believe this would make coding heaps faster - especially at 3am on 15th Cup of coffee with the hands shakin from all the CaFfEiNe!

What about it Lee?

P4 2.8GHz 800FSB, 128MB GeForce FX5800, 1GB PC 3200 DDR, Windows XP Pro, Dark Basic Pro 1.051b
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 1st Dec 2003 00:51
It's not documented because it doesn't exist, unless you have a plug-in that provides it.
JSN
22
Years of Service
User Offline
Joined: 8th Nov 2003
Location: 127.0.0.1
Posted: 1st Dec 2003 01:09
@IanM

Yeah, I appreciate what you're saying, and I believe the way to get this is via your plug in.

However...

Quote: "@JSN

Mid$ already has this functionality, it just isn't documented."

By Rob K

Does this mean the functionality IS available, but not documented, if so, what are the correct specs.

-----

~ J ~
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 1st Dec 2003 01:21
No, believe me. I *absolutely* know that this command doesn't exist as a 3 parameter version

Every command (and I do mean every command) is automatically captured by my interface library build system. I can even provide a list of the functions that don't have commands attached to them.

MID$ only appears once in the whole of the DBPro libraries.
JSN
22
Years of Service
User Offline
Joined: 8th Nov 2003
Location: 127.0.0.1
Posted: 1st Dec 2003 01:54
Okie dokie, thanks for that IanM.

Right, where was I...

O yeah..."MID$(string,start,length" WITHOUT 3rd party libraries...!

-----

~ J ~
Jaze
22
Years of Service
User Offline
Joined: 20th Nov 2003
Location: Connecticut, USA
Posted: 1st Dec 2003 03:04
I guess I'll have to write a little codesnip? I have an excellent FreePAscal Lib - I wonder If I should make some dll - even works with MySql Database - good way to store lots of media and data for 3D stuff hehe.

I am sorta dealing with lack of option explicit by making type called "rtFileNameGlobals" and then I make a global instance of it with minimal chars as I'll be typing it alot:

global grF as rtFilenameGlobals

` rt = record type, gr=global record

and then I access my vars like this: grf.iMyInteger = 10

This helps considerably - as it allows organization (when debugging
it helps me find what source file manges that by the global record variable name.

-=/Jaze/=-
Andy Igoe
23
Years of Service
User Offline
Joined: 6th Oct 2002
Location: United Kingdom
Posted: 1st Dec 2003 03:39
I too would like this feature, but only as an option that I can dissable within the editor, why?

This is the sort of thing that helps debugging, and when I am debugging I like to have onscreen what I have chosen to be onscreen - not the start of my code that gives an explicit command.

Declared variables, whatever their proper name, is a concept I am used too from other platforms and one I would appreciate (albiet out of the habbit of using).

I think by default such an option should be off, because it is not ... and here's the killer that may negate it's inclusion, it is not BASIC.


God created the world in 7 days, but we're still waiting for the patch.
Jaze
22
Years of Service
User Offline
Joined: 20th Nov 2003
Location: Connecticut, USA
Posted: 1st Dec 2003 03:47
Neither are multiword commands...Basic Syntax I mean

Camera Position X() <- Multi Keyword Function? Syntax? Basic?

I agree it should be an optional thing - There is nothing more frustrating than debugging an issue just to find its a mispeling

-=/Jaze/=-
MicroMan
22
Years of Service
User Offline
Joined: 19th Aug 2003
Location: Stockholm, Sweden
Posted: 1st Dec 2003 12:49
Well, I for one would wholeheartedly cheer if there was an OPTION EXPLICIT or equivalent in DBP.

@Andy Igoe
Quote: "
and here's the killer that may negate it's inclusion, it is not BASIC.
"


But that's never stopped any implementers of Basic. Basic is the least standardized language of all the great computer languages, and every Basic package is incompatible with everything else.

So, I wouldn't lift an eyebrow if DB was pushed further away from any sort of "standard" basic. There isn't any such thing anyway.

-----
They SAID that given enough time a million monkeys with typewriters could recreate the collected works of William Shakespeare... Internet sure proved them wrong.
-----
Andy Igoe
23
Years of Service
User Offline
Joined: 6th Oct 2002
Location: United Kingdom
Posted: 1st Dec 2003 18:42
ROFL, I love that sig line Micro


God created the world in 7 days, but we're still waiting for the patch.
Darkflame
23
Years of Service
User Offline
Joined: 4th Jul 2003
Location:
Posted: 1st Dec 2003 18:47
Yes, the internet created far better stuff then shakesphere's 1 dimensional rubbish :p
--
I wish to have more image function comands.
Specificaly, ones to simulate photoshop/PSP layer modes.

"The man who says it cannot be done is generally interrupted by someone doing it." ~ Elbert Hubbard

Login to post a reply

Server time is: 2026-07-27 01:32:53
Your offset time is: 2026-07-27 01:32:53