File problems due to lack two instructions. #INCLUDED ...
|
03-24-2017, 05:11 PM
(This post was last modified: 03-26-2017 10:42 PM by compsystems.)
Post: #1
|
|||
|
|||
File problems due to lack two instructions. #INCLUDED ...
Hello I'm creating a project that has n files that contain few equal internal names, and the functions are called between them.
Please create the following two files, from the HPP-CK A: The MAIN files of each file display a text string "NAME FILE MAIN" prg1.main; [ENTER] RETURNS "prg1 main" // Expected output. prg2.main; [ENTER] RETURNS "prg2 main" // Expected output. B: the functionX files of each file show a list that calls the main function of its own file and the other. prg1.functionX; [ENTER] RETURNS {"prg1 main", "prg2 main"} // Expected output. prg2.functionX; [ENTER] RETURNS {"prg2 main", "prg1 main"} // Expected output. FILE1 NAME: prg1 PHP Code: EXPORT main() prg1.functionX(); [ENTER] RETURNS "syntax error" // ok because prg2 has not yet been defined. FILE2 NAME: prg2 PHP Code: EXPORT main() prg1.functionX(); [ENTER] RETURNS "syntax error" // Why? or prg2.functionX(); [ENTER] RETURNS "syntax error" // Why? A trick, if you temporarily delete the path, it compiles successfully PHP Code: return { main, prg1.main }; PHP Code: return { main, main }; then rewrite route PHP Code: return { main, prg1.main }; The two files work fine, but think if there are several definitions, it is very laborious to perform the previous trick. prg1.main; [ENTER] RETURNS "prg1 main" // ok prg2.main; [ENTER] RETURNS "prg2 main" // ok prg1.functionX; [ENTER] RETURNS {"prg1 main", "prg2 main"} // ok prg2.functionX; [ENTER] RETURNS {"prg2 main", "prg1 main"} // ok /////////////////////////////////////////// Now If you rename any of the files it is obvious that a syntax error is generated. Because the path is not found prg2 -> prgM2 prg1.functionX; [ENTER] RETURNS "syntax error" // ok But if you re-rename with the original names still showing syntax error, Why? prgM2 -> prg2 prg1.functionX; [ENTER] RETURNS "syntax error" // ? From this arises the need for two new cmds or headers #INTERNAL: Internal name, not to depend on the name stored in the calculator or PC #INCLUDED: File for compilation attached FILE 1 NAME: 123ABCDEFRFR PHP Code: #INTERNAL prg1 FILE 2 NAME: 00000888 PHP Code: #INTERNAL prg2 I am not the only one that creates independent programs or a single file http://www.hpmuseum.org/forum/thread-722...ht=libmenu |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
File problems due to lack two instructions. #INCLUDED ... - compsystems - 03-24-2017 05:11 PM
RE: File problems due to lack two instructions. #INCLUDED ... - cyrille de brébisson - 03-28-2017, 06:02 AM
RE: File problems due to lack two instructions. #INCLUDED ... - compsystems - 03-30-2017, 02:46 PM
RE: File problems due to lack two instructions. #INCLUDED ... - cyrille de brébisson - 03-31-2017, 08:14 AM
|
User(s) browsing this thread: 1 Guest(s)