Android Question Function alias, reduce code, universal function module

xiaoyao

Active Member
Licensed User
Longtime User
How to copy text from code prompts?

Function alias, reduce code, universal function module
My universal function module, shared by multiple projects

Is there a way to implement a syntax for function aliases, where everyone can abbreviate commonly used functions or code blocks? Every project can use these codes or syntax. A rather clumsy approach is to rewrite a function wrapper and then copy the entire code to the bottom of the Main module, which will increase the volume of the compiled APK. The second method is to add a code module,



函数别名,通用函数库.png
 

xiaoyao

Active Member
Licensed User
Longtime User
Load code files, link shared code files, and automatically clear unused functions during compilation
include# "myFunction.bas",include# "d:\fun2.bas"

Load the code file to the current code page, so there is no need to copy it and functions can be called directly. If adding another module, call module1.fun (a, b).
Point 2: Writing code is more tiring It can be linked to existing code repository directories, shared by multiple projects, and updated simultaneously. When compiling, the latest source code will be automatically used.
The third point is to optimize the coding process by automatically trimming unused functions in the code module and reducing the size of the APK
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
You can link another class or module from another project by adding it to the modules tab by absolute path.
 
Upvote 0
Top