Page 1 of 1

How to use procedures in PureBasic

Posted: Wed Jul 26, 2023 2:50 pm
by Jan2004
Interesting article about how to use procedures in PureBasic . Replace each word "function(s)" in the article with "procedure(s)".
https://www.freecodecamp.org/news/organ ... functions/

Re: How to use procedures in PureBasic

Posted: Wed Jul 26, 2023 3:08 pm
by jacdelad
This has nothing to do with PureBasic and also it's not interesting (just lowest basic knowledge)...

Re: How to use procedures in PureBasic

Posted: Wed Jul 26, 2023 4:31 pm
by Tenaja
jacdelad wrote: Wed Jul 26, 2023 3:08 pm This has nothing to do with PureBasic and also it's not interesting (just lowest basic knowledge)...
Be kind... Remember, some people do not yet have the lowest basic knowledge... Fred has said on several occasions that his primary goal for PB was newbies. He's grown its usefulness beyond that, but i don't think he's changed the primary goal.

Re: How to use procedures in PureBasic

Posted: Wed Jul 26, 2023 4:33 pm
by Jan2004
Jacdelad, you wrote in the post:
This has nothing to do with PureBasic.
I disagree with this statement. My opinion is different. It has a lot in common with PureBasic.
You continue writting:
it's not interesting (just lowest basic knowledge).
This is also an opinion tailored to you. Here on the forum there is a group of fellow beginners: such analogies, as in the article, allow to get to know programming in PureBasic better. I've been writing programs in different languages for a very long time and I like to go back to the basics - it still gives me pleasure and also gives me a better feel by looking from a different perspective. And since these are the basics, it's very easy for me to understand other people's points of view. Tastes are different. Think about it when making categorical statements. I suggest you: do your things, I will stick to my beliefs and experiences anyway.

Re: How to use procedures in PureBasic

Posted: Wed Jul 26, 2023 4:41 pm
by jacdelad
You both may be right, but this forum is currently flooded with people posting nonsense, asking questions which were asked many times before (use the searching function) and stuff which is simply offtopic.

I may be old school and grumpy, but things like this link aren't helpful. The net if flooded with "content creators" and influencers who explain the world without really giving information or the information could be said in one sentence. I've seen tutorials on soldering which make me want to rush these people naked through the streets, because they clearly don't know what they're doing.

I'm sorry for my outburst, I'll shut up and try to ignore these posts.

Re: How to use procedures in PureBasic

Posted: Wed Jul 26, 2023 5:38 pm
by Little John
Especially for beginners, examples written in a different programming language are not well suited ...
jacdelad wrote: Wed Jul 26, 2023 4:41 pm You both may be right, but this forum is currently flooded with people posting nonsense, asking questions which were asked many times before (use the searching function) and stuff which is simply offtopic.

I may be old school and grumpy, but things like this link aren't helpful. The net if flooded with "content creators" and influencers who explain the world without really giving information or the information could be said in one sentence. I've seen tutorials on soldering which make me want to rush these people naked through the streets, because they clearly don't know what they're doing.
Agreed.

Re: How to use procedures in PureBasic

Posted: Wed Jul 26, 2023 8:57 pm
by Caronte3D
Little John wrote: Wed Jul 26, 2023 5:38 pm Agreed.
+1

Re: How to use procedures in PureBasic

Posted: Wed Jul 26, 2023 9:13 pm
by netmaestro
It's nice to be right.
but more importantly by far
It's right to be nice.
We all started somewhere...

Re: How to use procedures in PureBasic

Posted: Wed Jul 26, 2023 10:56 pm
by idle
I think it's worth a discussion and not just from a beginners perspective.
Programing is an art as much as a science and there's always something new to learn.
Now that pb has a c backend we get an opportunity to learn how to adapt our code techniques to facilitate free optimizations, things like auto vectorization of code but it just doesn't happen like magic.

How to use youtube

Posted: Sat Jul 29, 2023 1:15 am
by Olli
Next bootcamp, without the glasses...

In my humble opinion, where I was young, we were two to be interested by coding : a boy, a girl.

I think the biggest damage in the humankind is this very strange majority of men which are interested in coding, compared to women.

Google translate from english to french :

women = femmes
men = Hommes

It's a joke there from Google this upper letter ?

I meet women I talk about coding. Main problem : the time. I do not think pureBasic has an online native interpreter. If I mistake, please add a link. I give the link about w3school which offers an online coding tutorial for free. I give it to these women this online link, and it is the time, the main problem. So, I think chatGPT is too early in the humankind to be good for humankind.

Because we did not solve the problem of equality of the interest in coding between the women and the men.

So, yes, it is a good subject where we can see women which share a knowledge I love. And, yes, a function is a procedure.

I remember a recent time I type this :

Code: Select all

Procedure myProc()
   Define result
EndProcedure
and then a friend here recalled me this :

Code: Select all

Procedure myProc()
  Protected result
EndProcedure
was the real way...

I know however procedures since a very long time. A code part we nest in a specific text space titled by a name and an arguments template.

So, depending of the language, the variables follow the rules of several directives of visibility. And these rules break the whole link between these lessons from away and a pureBasic doc page. But it does not break the general aspect of a function litterally.