How to use procedures in PureBasic

For everything that's not in any way related to PureBasic. General chat etc...
Jan2004
Enthusiast
Enthusiast
Posts: 163
Joined: Fri Jan 07, 2005 7:17 pm

How to use procedures in PureBasic

Post 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/
User avatar
jacdelad
Addict
Addict
Posts: 2029
Joined: Wed Feb 03, 2021 12:46 pm
Location: Riesa

Re: How to use procedures in PureBasic

Post by jacdelad »

This has nothing to do with PureBasic and also it's not interesting (just lowest basic knowledge)...
Good morning, that's a nice tnetennba!

PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
User avatar
Tenaja
Addict
Addict
Posts: 1959
Joined: Tue Nov 09, 2010 10:15 pm

Re: How to use procedures in PureBasic

Post 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.
Jan2004
Enthusiast
Enthusiast
Posts: 163
Joined: Fri Jan 07, 2005 7:17 pm

Re: How to use procedures in PureBasic

Post 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.
User avatar
jacdelad
Addict
Addict
Posts: 2029
Joined: Wed Feb 03, 2021 12:46 pm
Location: Riesa

Re: How to use procedures in PureBasic

Post 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.
Good morning, that's a nice tnetennba!

PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
Little John
Addict
Addict
Posts: 4802
Joined: Thu Jun 07, 2007 3:25 pm
Location: Berlin, Germany

Re: How to use procedures in PureBasic

Post 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.
User avatar
Caronte3D
Addict
Addict
Posts: 1370
Joined: Fri Jan 22, 2016 5:33 pm
Location: Some Universe

Re: How to use procedures in PureBasic

Post by Caronte3D »

Little John wrote: Wed Jul 26, 2023 5:38 pm Agreed.
+1
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8452
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Re: How to use procedures in PureBasic

Post by netmaestro »

It's nice to be right.
but more importantly by far
It's right to be nice.
We all started somewhere...
BERESHEIT
User avatar
idle
Always Here
Always Here
Posts: 6023
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: How to use procedures in PureBasic

Post 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.
Olli
Addict
Addict
Posts: 1256
Joined: Wed May 27, 2020 12:26 pm

How to use youtube

Post 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.
Post Reply