mirror of
https://github.com/irmen/prog8.git
synced 2026-04-26 05:17:54 +00:00
allow alias to blocks
This commit is contained in:
@@ -125,8 +125,10 @@ The ``alias`` statement makes it easier to refer to symbols from other places, a
|
||||
you from having to type the fully scoped name everytime you need to access that symbol.
|
||||
Aliases can be created in any scope except at the module level.
|
||||
An alias is created with ``alias <name> = <target>`` and then you can use ``<name>`` as if it were ``<target>``.
|
||||
It is possible to alias variables, labels and subroutines, but not whole blocks.
|
||||
The name has to be an unscoped identifier name, the target can be any symbol.
|
||||
It is possible to alias variables, labels and subroutines, and even whole blocks.words
|
||||
The name has to be an unscoped identifier name, the target can be any scoped or unscoped symbol.
|
||||
Please consider using aliases sparingly because it may lead to confusing code if you alias
|
||||
well-known block names for example.
|
||||
|
||||
|
||||
.. _blocks:
|
||||
|
||||
@@ -13,7 +13,6 @@ Future Things and Ideas
|
||||
- make builtin functions capable of returning multiple values, then make divmod() return the 2 results rather than accepting 2 extra variables as arguments
|
||||
- then also introduce lmh(longvalue) -or whatever sensible name- builtin function that returns the low, mid, hi (bank) bytes of a long.
|
||||
- and rewrite the divmod (and others?) function to just return the 2 results instead of taking target variables as arguments.
|
||||
- allow alias to blocks? There's some code look for "experimental code to be able to alias blocks"
|
||||
- add a -profile option (for now X16 only) that instruments the start (and returns?) -of every prog8 subroutine with code that dumps to the X16 emulator debug console: name of sub, stack pointer (for call depth!), emudbg cycle count. Save/restore all used registers! Start of program must set cycle count to zero.
|
||||
- add @private to variables and subroutines declared in a scope to make them invisible from outside that scope?
|
||||
- when implementing unsigned longs: remove the (multiple) "TODO "hack" to allow unsigned long constants to be used as values for signed longs, without needing a cast"
|
||||
@@ -110,6 +109,7 @@ IR/VM
|
||||
|
||||
Libraries
|
||||
---------
|
||||
- add a string to long conv routine
|
||||
- Add split-word array sorting routines to sorting module?
|
||||
- make a list of all floats.* routines that the compiler expects for full float support?
|
||||
|
||||
|
||||
Reference in New Issue
Block a user