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 Discussion / Backspace?

Author
Message
Irojo
17
Years of Service
User Offline
Joined: 21st May 2008
Location: Eating toast.
Posted: 6th Jun 2008 04:00 Edited at: 14th Dec 2009 04:53
If you read this, I am just using this thread to upload my files. It's so much easier that way.


Time is money. I just ripped you off.

Attachments

Login to view attachments
Libervurto
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 6th Jun 2008 04:08 Edited at: 6th Jun 2008 04:11
there isn't a built-in backspace function but it's easy to do using the keystate() command.

use scancode() to find what key number backspace is; I'll use 14 as I think that's what it is, but I could be wrong.
Then use keystate(14) to detect key 14.

It is far better to complete a 10 line program than to start a 10,000 line program.
Irojo
17
Years of Service
User Offline
Joined: 21st May 2008
Location: Eating toast.
Posted: 6th Jun 2008 04:17 Edited at: 6th Jun 2008 04:19
Thanks as always Obese.

Yes it's 14.

It's far better to write a funny signature then to write one of lines.
BN2 Productions
21
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 12th Jun 2008 11:50
here, backspace function (just made it right now, untested)



This is an utterly useless function, as you could just use keystate(14) but many people have asked about it so it is done.

Ever notice how in Microsoft word, the word "microsoft" is auto corrected to be "Microsoft" but "macintosh" just gets the dumb red underline?
Libervurto
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 12th Jun 2008 19:50
@BN2
its endfunction not return

It is far better to complete a 10 line program than to start a 10,000 line program.
BN2 Productions
21
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 13th Jun 2008 00:25
OOPS sorry! Good catch. Dunno how I got those mixed up
corrected function:


Ever notice how in Microsoft word, the word "microsoft" is auto corrected to be "Microsoft" but "macintosh" just gets the dumb red underline?
Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 13th Jun 2008 15:13
@WindowsKiller

Quote: "because functions can only return constant values or local variables"


It works in DBC.

Enjoy your day.
NanoGamez guy
18
Years of Service
User Offline
Joined: 13th Jan 2007
Location: Closer than you think...
Posted: 13th Jun 2008 19:05
Quote: "You don't seem to have any experience with functions"


I don't that the mistake means that he doesn't have any experience, I make it all the time too. It's probably because other languages use return in their functions.


What are the chemical formulae of:
Sodium Nitrate, Gallium, Manganese and Einsteinium
BN2 Productions
21
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 14th Jun 2008 03:25
Quote: "Even your corrected function doesn't compile,"


tested it, it works.


of course if it bothers you, you could always do:


Ever notice how in Microsoft word, the word "microsoft" is auto corrected to be "Microsoft" but "macintosh" just gets the dumb red underline?
Invincibob 8
17
Years of Service
User Offline
Joined: 4th Feb 2008
Location: Some Place Somewhere
Posted: 3rd Jul 2008 07:19
Quote: "functions can only return constant values or local variables"

I think he's talking about a language other than DBC. DBP perhaps?

Login to post a reply

Server time is: 2025-06-06 00:05:17
Your offset time is: 2025-06-06 00:05:17