I've got a script that uses `link' to include a file containing a few procedures. This library that I'm trying to link lives in the same
directory as the script file. I compiled the library using `icont -c
<filename.icn>' which created filename.u1 and filename.u2.
However, the code does not seem to be linked in as the script outputs
wrong data. What am I doing wrong? TIA ..
-- Duke
On 2025-02-12, Sidney Reilley <[email protected]> wrote:
On 2025-02-11, Jason Martin <[email protected]> wrote:
On 2025-02-11, Sidney Reilley <[email protected]> wrote:
I've got a script that uses `link' to include a file containing a few
procedures. This library that I'm trying to link lives in the same
directory as the script file. I compiled the library using `icont -c >>>><filename.icn>' which created filename.u1 and filename.u2.
However, the code does not seem to be linked in as the script outputs
wrong data. What am I doing wrong? TIA ..
-- Duke
Page 184 of the Icon book 3rd edition
[It will be Page 206 in your PDF viewer]
CREATING NEW LIBRARY MODULES
Keep reading about IPATH after that.
They may need to be in IPATH.
I've got IPATH pointing to where all the scripts live.
Any other ideas?
# mylib.icn
# Note: Libraries cannot have procedure main()
procedure one()
write("ONE")
end
procedure two()
write("TWO")
end
icont -c mylib.icn
# main.icn
link mylib
procedure main()
write("Main")
write(one())
write(two())
end
icon main.icn
# Works for me on GhostBSD without IPATH
Main
ONE
TWO
On 2025-02-11, Jason Martin <[email protected]> wrote:
On 2025-02-11, Sidney Reilley <[email protected]> wrote:
I've got a script that uses `link' to include a file containing a few
procedures. This library that I'm trying to link lives in the same
directory as the script file. I compiled the library using `icont -c >>><filename.icn>' which created filename.u1 and filename.u2.
However, the code does not seem to be linked in as the script outputs
wrong data. What am I doing wrong? TIA ..
-- Duke
Page 184 of the Icon book 3rd edition
[It will be Page 206 in your PDF viewer]
CREATING NEW LIBRARY MODULES
Keep reading about IPATH after that.
They may need to be in IPATH.
I've got IPATH pointing to where all the scripts live.
Any other ideas?
| Sysop: | Keyop |
|---|---|
| Location: | Huddersfield, West Yorkshire, UK |
| Users: | 715 |
| Nodes: | 16 (0 / 16) |
| Uptime: | 165:16:28 |
| Calls: | 12,096 |
| Calls today: | 4 |
| Files: | 15,001 |
| Messages: | 6,517,805 |