Jump to content

Talk:Executable library: Difference between revisions

→‎Pike problem: clarification, and remove redundant remark
(→‎Pike problem: clarification, and remove redundant remark)
Line 61:
==Pike problem==
''"to use the library as a class, save it as HailStone.pike to use it as a module, save it as Hailstone.pmod "'' is not what the task is after. Make it one file and your on! --[[User:Paddy3118|Paddy3118]] 07:34, 7 November 2011 (UTC)
: the first file IS the one file you are looking for. it is the complete library, usable as an executable. the other two files demonstrateare howto satisfy the second requirement to build a second executable to use itthe library. since usage as a class orand libraryas a module are different, this solution provides both. i have added that to the explanations. thank you for pointing out that this was not clear.
: to elaborate:
:: every source file in Pike can be used as an executable if it has a <code>main()</code> function.
:: every source file can be used as a module if it has a <code>.pmod</code> extension.
:: every source file can always be used as a class (because it is one)
:: the code for all 3 forms may be identical.--[[User:EMBee|eMBee]] 08:24, 7 November 2011 (UTC)
:to use a class or module obviously only makes sense when called from another file and thus the extra files in the solution.--[[User:EMBee|eMBee]] 08:08, 7 November 2011 (UTC)
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.