News:

Function Finder  Find all the functions within source code files

Main Menu

Psub

Started by moonlightembrace, March 16, 2006, 01:24:29 AM

Previous topic - Next topic

moonlightembrace

This is bugs me a bit. If a language advertises itself as a BASIC variant, shouldn't it closely follow the core BASIC used and developed as a standard for 30 years? Psub is an example of this. Why not just the good old SUB? Imagine my dismay as I typed in SUB and found an error. Imagine my dismay as I found it was needlessly renamed to Psub.

But really, why? Is it an attempt to brand the language with P(lay)? Like a pokemon constantly says it's name?

-ME

Panzoo

QuoteBut really, why? Is it an attempt to brand the language with P(lay)? Like a pokemon constantly says it's name?
or Chuck Norris... Witch someone told me has a good chance of becoming the next big pokemon.

kevin

#2
 They're called Psub (Protected Subroutines) to avoid questions just like this!   Where a user of a different basic dialect drags and drops code into PB only to find it it operates differently.  Which would most certainly happen if they were called SUBS

 Protected subs function like an encapsulated 'static' scope.  Were local variables retain their value between calls.  Making everything static mean you loose recursion and gain some performance from the call overhead.

Conceptually many new programmers tend to find them easier to understand than functions.

moonlightembrace

Ah, I get it, and it makes sense. So, why not add SUBs as well?

-ME