08-14-2023, 04:43 PM
(This post was last modified: 08-14-2023, 04:51 PM by mnrvovrfc.
Edit Reason: Clarifiying this is a proposal
)
I was trying to find the post months ago by dbox where he says "JS <> JavaScript".
THIS IS A PROPOSAL:
I guess it's just reserving global variables that could be used inside a "func", and are called into play for something like this:
or have a keyword (I call "param") to represent the special variables:
The problem is those special variables might have to be given types also. Not assume they are all "var". :/
Let me try to explain to see if Aurel doesn't get confused easily.
Define variables as usual but that cannot be used in main-level code. Which would require a special keyword. Maybe (with fake "paramv" and "params" keywords) have something like this:
The only difference between "callmexa" and "a" is that "callmexa" can be accessed only in "callme" subprogram because that subprogram is specifically calling for it. If there's another func and it's not referring to "callmexa" then that parameter cannot be used.
The advantage of a system like this is that it could be restricted to conserve RAM, say to five "var", five "str" and five "ptr" variables. If you want more you beg Aurel for micro(A) code, modify it to support more and recompile.
Otherwise work on something that looks more like Perl or MS-DOS batch language or "bash" script, but which could be potentially confusing and difficult to debug.
Quote:Yeah if this is about User Defined Functions in MicroA, yes go for it man! Love to see that no matter how you get there.
THIS IS A PROPOSAL:
I guess it's just reserving global variables that could be used inside a "func", and are called into play for something like this:
Code: (Select All)
var one, two
str tres
callme(one, two, tres)
func callme()
print $1, $2, $3
endfn
or have a keyword (I call "param") to represent the special variables:
Code: (Select All)
param callmexa, callmeya, callmeps, yadaone, yadatwo, foobar, elisa4
func callme(callmexa, callmeya, callmeps)
print callmexa, callmeya, callmeps
endfn
The problem is those special variables might have to be given types also. Not assume they are all "var". :/
Let me try to explain to see if Aurel doesn't get confused easily.
Define variables as usual but that cannot be used in main-level code. Which would require a special keyword. Maybe (with fake "paramv" and "params" keywords) have something like this:
Code: (Select All)
paramv callmexa, callmeya
params callmeps
var a, b
str s
func callme(callmexa, callmeya, callmeps)
endfn
The only difference between "callmexa" and "a" is that "callmexa" can be accessed only in "callme" subprogram because that subprogram is specifically calling for it. If there's another func and it's not referring to "callmexa" then that parameter cannot be used.
The advantage of a system like this is that it could be restricted to conserve RAM, say to five "var", five "str" and five "ptr" variables. If you want more you beg Aurel for micro(A) code, modify it to support more and recompile.
Otherwise work on something that looks more like Perl or MS-DOS batch language or "bash" script, but which could be potentially confusing and difficult to debug.