Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - aonyn

Thanks Ian  :)

TBH as well, you mention you comment your code very well.
Personally I comment only where things need commenting, and rather rely on very explicit code, as well as the way I structure my code and names I use to make my code as "self documenting" as possible. This works for me, but I'd put it in category of bad habits I would never recommend to someone who is beginning. My code as a result is often quite a bit more verbose than most programmers would prefer.   :)

Hi Ian,

I just want to apologize, I hope I did not offend you by implying your way was wrong. That was not intended, and I am sorry if it came across that way.
This was a piece of advice which was passed on to me when I was at the very bottom of the learning curve, and which I have personally found to be one of the most useful pieces of advice I have been given. Overall, the method I described keeps me disciplined, and helps me to keep my code organized. Certainly though, nothing was wrong with the way you described.
I just wanted to clarify the difference between the two ways, for a new member who I presumed is also a new programmer, and pass the advice which was beneficial to me when I was starting.

As I said in my first post though, I see it as much art as science, and I expected that others would see the matter differently.
I am sorry to have come across as demeaning your post.

Thanks Gernot

Hi Gernot,

Yesterday, when I started GLBasic, it saw a new version and downloaded / installed it.
However, The logfile shows no new version after version 9.006, and my IDE info still says it is version 9.006.
The update did appear to be unusually small.

Was this perhaps some minor fix, that did not warrant an entire new version assignment and log file addition, or did something go wrong with my update?

Hi I666NoB666I,

I don't know if you are new to programming in general, or just new to GLBasic.
Assuming you may be new to programming altogether, I figure I should elaborate a bit, as Ian and I gave two similar ways to handle the same thing, but what happens in your program is actually quite different.

What is the same in both examples is that we both declared the variable before using it, so now, GLBasic knows to expect a string called name$.

The difference is GLOBAL vs LOCAL.
GLOBAL variables can be directly accessed and manipulated from anywhere inside your program, including from functions without having to directly pass the variable as an argument, or even a pointer to the variable.
LOCAL is only accessible from the scope within which it was created, so to access a LOCAL variable from a function other than which it was created, it must be manually passed.

While this may seem like extra work and an extra layer of complexity to your program and more to learn and understand, it will be important to understand as your programs grow in size and complexity.

My personal preference and recommendation is to always use LOCAL variables, unless there is good reason to use GLOBAL for a particular circumstance.
Of course experience will help you to make these kind of decisions.
This will help keep your code organized, easier to maintain, and in many cases, it will help make functions more portable to reuse from one program to the next.

Please understand though that all programmers have their own style and preferences, and others on this forum may disagree with me entirely, which is OK.
Programming is as much art as it is science, so in the end, what is important is that you achieve the results you envisioned when you decide to start a project.

Oh, and in case perhaps you already knew all this and you are experienced, I apologize if this was in any way condescending, it is certainly not intended to be.
I just wanted to explain further in case you are indeed a beginner, and I hope this is useful to you.

Anyway, best of luck with GLBasic, I am sure you will love it.
I certainly do, and BTW, I work in numerous languages, but GLBasic is at the top of my list of preferred languages.
This is especially due to Gernot's always active support, and the very friendly community here.
And as Ian said in his post, Welcome  :)


EDIT - One more thing I want to mention, personally I recommend to leave explicit declarations turned on.
This will force you to be a bit more disciplined, and IMO it is good practice to always explicitly declare, as well as type (string, integer, float, etc) everything.
Code (glbasic) Select

PRINT "what is your name?" ,0,0
LOCAL name$
INPUT name$ ,0,5
PRINT "hello ",0,10
PRINT name$,0,15
Wow, that is really very cool.  ;)
Hi Hemlos,

Thanks for posting that link to your math guide.
I just looked through several sections, and it is all very well explained and easy to follow.

Hi djtoon,

That is very nice looking.  :)

Well I have had slowdowns, but it has always turned out to be something dumb I have done in a function  :blink:
As a problem due to a glbasic bug, I have not had any trouble with that.

Is you gfx card overheating or anything?

Off Topic / Re: Birthday
Happy Birthday  :booze:
Hi Gernot,

This is definitely not a major bug, but I just noticed it, and figure I will post it here so it is a known issue.
By no means is it a bug to lose sleep over though.

In the 9.006 IDE, you can scroll past the end of a document I think infinitely using the scroll wheel on a mouse.
Using the slide widget on the edge of the screen, it stops as it should.

Thanks Gernot

Hi Gernot,

Now that I have GLB V9 working, so far everything seems good.
I have noticed one minor yet slightly annoying issue, which I don't know if it is a bug, or something with my system, although it is limited to the new IDE, and never happened in V8.

While typing code in the main workspace, the right side text area for jump / files / web / debug flickers.
It does not seem to hurt anything, but as I said, it can be annoying seeing the flickering out of the corner of my eye as I type.

Do you have any thoughts what could be the cause?

Hi All,

Please make it optional if added, Autocomplete always drives me nuts.