... of discussions, where some "experts" reply to messages which they did never read, and/or post stuff that is completely off-topic in the respective thread. This happens often here on the forum. When it's a thread that was started by me, I feel the need to set things right. This is nothing but a waste of time and energy from my point of view.
... of running against walls in the heads of other people. And I'm not going to offer my commitment, my ideas, my knowledge and my experience as if they were sour beer.
I'll maintain my contributions (if necessary), though.
And every now and then I'll maybe have a coding question or bug report.
My main suggestion was/is, not to use '0' everywhere in an example where it is technically possible, but to use meaningful named constants instead.
+100
Once I realised years ago that I could replace all the 0's with my own constants, I did just that and my code is so much more readable, meaningful and a hell of a lot easier to debug as I read it line by line.
E.g. If DatabaseQuery fails, you can always get the results of a database error but if I substitute the generic 0 for a failed query with my own #DatabaseQueryFail, it makes sense to me that it failed and went to my handler.
#DatabaseQueryFail = 0
SetDatabaseString(Databasehandle, 0, "1")
SetDatabaseString(Databasehandle, 1, "1")
If DatabaseQuery(Databasehandle), "UPDATE db_addresses SET locked = ? WHERE recordid = ?") <> #DatabaseQueryFail
; "Do something here
Else ; Query failed, constant is now obvious too so we get here
Debug DatabaseError()
EndIf
Andre wrote:I agree here, the UserGuide is probably the best place for this more expanded descriptions and examples.
This was also the reason for me, to start the following thread in the PB forum: viewtopic.php?f=7&t=45842
Absolutely, Andre. The explanations and examples there conform pretty much to what's being suggested here, demonstrating syntactical and contextual applications and implementations.
Perhaps this thread would be better served if merged there.
Texas Instruments TI-99/4A Home Computer: the first home computer with a 16bit processor, crammed into an 8bit architecture. Great hardware - Poor design - Wonderful BASIC engine. And it could talk too!Please visit my YouTube Channel
In the beginning i never used it and though i dont need it... obviously a mistake
Now i always use it (i also use End btw.).
I think it would be a good thing to have it only as check box option in the compiler settings that by default is always on.
This doesn't have got much to do with what I wrote in the first post of this thread.
Feel free to start a discussion about that in a separate thread, but don't hijack this one
Denis wrote:+1
EnableExplicit by default will be good.
Maybe someone is interested in the fact, that I (deliberately!) never wrote that ...
This is a different discussion. Feel free to discuss that in your own thread, but don'*t hijack this one
Little John wrote:Another improvement of example codes would be, to make them ready for usage withEnableExplicit. So I actually would write the respective examle code like this:
I never requested that, and this has nothing got to do with what I wrote in my original post here.
However, it's old news hat some people like to post offtopic stuff in other people's threads ...
@Little John
Your post was already hijacked and my response wasn't to you..
Current configurations:
Ubuntu 20.04/64 bit - Window 10 64 bit
Intel 6800K, GeForce Gtx 1060, 32 gb ram.
Amd Ryzen 9 5950X, GeForce 3070, 128 gb ram.