Search found 1205 matches

by Piero
Thu Mar 12, 2026 7:40 pm
Forum: Off Topic
Topic: Music
Replies: 50
Views: 26203

Re: Music

by Piero
Thu Mar 12, 2026 7:24 pm
Forum: Coding Questions
Topic: Simple SQL db questions.
Replies: 4
Views: 70

Re: Simple SQL db questions.

Databases?
Do you mean poor AIs forcibly interpreting data in a biased way?
by Piero
Thu Mar 12, 2026 3:49 pm
Forum: Coding Questions
Topic: How do I make a hint in any coordinates?
Replies: 2
Views: 146

Re: How do I make a hint in any coordinates?

Dear AZJIO, I'm subcoscious in this moment (did a lot of stuff past night; I'm very tired…) but hope the Wise Admins will let me communicate to you a Glorious, never-heard-before, Heavenly Message: please get a Mac
by Piero
Thu Mar 12, 2026 2:55 pm
Forum: Coding Questions
Topic: A database of ready-made program codes written in PB
Replies: 5
Views: 107

Re: A database of ready-made program codes written in PB

You almost seem to be an AI from your answers, anyway who cares?
Recently, I tried to ask some programming stuff to google gemini (free, no login) and sometimes it was a great help… (I said sometimes; on other occasions it was FAR worse than getting no response………)
by Piero
Thu Mar 12, 2026 11:20 am
Forum: Coding Questions
Topic: Procedure defaults
Replies: 7
Views: 160

Re: Procedure defaults

SMaag wrote: Thu Mar 12, 2026 7:08 amWhat is your goal to reach?
Having optional parameters anywhere, not only at the end of the "parameter list"

viewtopic.php?p=652619#p652619
by Piero
Thu Mar 12, 2026 10:58 am
Forum: Coding Questions
Topic: A database of ready-made program codes written in PB
Replies: 5
Views: 107

Re: A database of ready-made program codes written in PB

Just remember that anything you find MAY need some tweaking (to work on the latest PB version)

viewtopic.php?t=83956
by Piero
Thu Mar 12, 2026 10:36 am
Forum: Coding Questions
Topic: A database of ready-made program codes written in PB
Replies: 5
Views: 107

Re: A database of ready-made program codes written in PB

If you mean simple stuff for beginners (not github repositories full of "complex" stuff…) there are some on PB explorer tab…

PS: Welcome!
by Piero
Thu Mar 12, 2026 9:51 am
Forum: Feature Requests and Wishlists
Topic: Macro feature
Replies: 5
Views: 153

Re: Macro feature

I would have proposed to implement it also for procedures, but probably it would be confusing to see:
DoStuff(,,,2,,4,,"Pizza",,1)
directly in procedures… that's not the case with macros; they CAN be a little cryptic (# stuff etc.)
DoStuff(,,,2,,4,, Pizza, ,1) ; ', ,' same as ',,'

PS: in any ...
by Piero
Thu Mar 12, 2026 7:15 am
Forum: Tricks 'n' Tips
Topic: Create Full Path Procedure
Replies: 19
Views: 466

Re: Create Full Path Procedure

Procedure.s MakePath(FullPath$)
Protected Path$, cs, i
FullPath$ = RTrim(FullPath$, #PS$)
cs = CountString(FullPath$, #PS$) + 1
For i = 1 To cs
Path$ + StringField(FullPath$, i, #PS$) + #PS$
If FileSize(Path$) <> -2 And Not CreateDirectory(Path$)
ProcedureReturn Path$ ; Error Folder
EndIf ...
by Piero
Thu Mar 12, 2026 4:24 am
Forum: Feature Requests and Wishlists
Topic: Macro feature
Replies: 5
Views: 153

Macro feature

Code: Select all

Macro m(a=0,b=0,c=0)
   Debug b
EndMacro

m(,1) ; b=1
by Piero
Thu Mar 12, 2026 3:41 am
Forum: Coding Questions
Topic: Procedure defaults
Replies: 7
Views: 160

Re: Procedure defaults

It would be cool if this worked:

Code: Select all

Macro m(a=0,b=0,c=0)
   Debug a+b+c
EndMacro

m(,1) ; should give 1 (b=1)
by Piero
Thu Mar 12, 2026 2:28 am
Forum: Coding Questions
Topic: Procedure defaults
Replies: 7
Views: 160

Re: Procedure defaults

Thanks, I know; I could have used #PB_Default too :D
I WANT to get 2 as result! :shock:
by Piero
Thu Mar 12, 2026 12:34 am
Forum: Coding Questions
Topic: Procedure defaults
Replies: 7
Views: 160

Procedure defaults

Is this possible in some easy way?

Code: Select all

Procedure p(a=1, b=1, c=1)
   ProcedureReturn a + b + c
EndProcedure

Debug p(#PB_Ignore, #PB_Ignore, 0) ; should return 2
by Piero
Wed Mar 11, 2026 7:05 pm
Forum: Tricks 'n' Tips
Topic: Create Full Path Procedure
Replies: 19
Views: 466

Re: Create Full Path Procedure

Fun fact: for PB Mac FileSize, "/a/path/" <> "/a/path" if there is a "path" file, but not on windows (so I edited my previous post a bit)
by Piero
Wed Mar 11, 2026 5:18 am
Forum: Tricks 'n' Tips
Topic: Create Full Path Procedure
Replies: 19
Views: 466

Re: Create Full Path Procedure

:mrgreen:
Procedure Makepath(Sample$)
Protected PS$, Path$, Path2$, cs, D, fs
Sample$ = Trim(Sample$, #PS$)
If #PS$ = "/" : PS$ = #PS$ : EndIf
cs = CountString(Sample$, #PS$) + 1
For D = 1 To cs
Path2$ + StringField(Sample$, D, #PS$) + #PS$
Path$ = PS$ + Path2$
fs = FileSize(Path$)
If fs ...