LB Booster
« Events »

Welcome Guest. Please Login or Register.
Apr 1st, 2018, 04:48am



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
We apologize Conforums does not have any export functions to migrate data.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

Thank you Conforums members.
Speed up Liberty BASIC programs by up to ten times!
Compile Liberty BASIC programs to compact, standalone executables!
Overcome many of Liberty BASIC's bugs and limitations!
LB Booster Resources
LB Booster documentation
LB Booster Home Page
LB Booster technical Wiki
Just BASIC forum
BBC BASIC Home Page
Liberty BASIC forum (the original)

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Events  (Read 596 times)
Alincon
Full Member
ImageImageImage


member is offline

Avatar




PM


Posts: 147
xx Re: Events
« Reply #6 on: Nov 7th, 2015, 12:27am »

"There's an undocumented feature of LB whereby you can enable both single- and double-click events from a listbox. I do not support that in LBB, although I could."

I have a program that DOES use both single and double click events
because I need to do two different things, and I didn't want to use a menu with only two choices.
I hope you will support this feature in the future.

By happenstance, in that same program I get an error on this statement (which works in LB)
Code:
today = val(date$("days"))
 


I had to use these two lines, instead

Code:
today$ = date$("days")
today = val(today$)
 


r.m.
User IP Logged

joker
Global Moderator
ImageImageImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 157
xx Re: Events
« Reply #7 on: Nov 7th, 2015, 01:29am »

Alincon, you should have started another thread, because your problem with the date will get lost if someone searches.

Anything we can do to keep Richard engaged in updating LBB is a good thing! cheesy
User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx Re: Events
« Reply #8 on: Nov 7th, 2015, 09:50am »

on Nov 7th, 2015, 12:27am, Alincon wrote:
By happenstance, in that same program I get an error on this statement (which works in LB).

It only works in LB because of a bug. The docs clearly state that the function date$("days") returns a numeric value, not a string:

"print date$("days") ' 36127 returns number - days since Jan 1, 1901".

So of course if you do val(date$("days")) it is a Type Mismatch - the VAL() function expects a string parameter, not a numeric parameter.

The correct code (which will work in JB, LB 4.04, LB 4.5.0 and LBB) is:

Code:
today = date$("days") 

I won't be changing LBB to emulate the bug; the fault is in your program.

Richard.
« Last Edit: Nov 7th, 2015, 10:05am by Richard Russell » User IP Logged

Alincon
Full Member
ImageImageImage


member is offline

Avatar




PM


Posts: 147
xx Re: Events
« Reply #9 on: Nov 8th, 2015, 9:53pm »

I agree that my code was wrong, your is right, and I should have known better.

Just one more question: why do you let both of these work?

Code:
today = date$("days") 
today$ = date$("days") 
 


r.m.



User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls