Talk:Executable library: Difference between revisions

Content added Content deleted
(→‎Pike problem: clarification, and remove redundant remark)
Line 61: Line 61:
==Pike problem==
==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)
''"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 files demonstrate how to use it as a class or library. i have added that to the explanations. thank you for pointing out that this was not clear.
: the first file IS the one file you are looking for. it is the complete library, usable as an executable. the other two files are to satisfy the second requirement to build a second executable to use the library. since usage as a class and as 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:
: to elaborate:
:: every source file in Pike can be used as an executable if it has a <code>main()</code> function.
:: 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 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)
:: every source file can always be used as a class (because it is one)
:: the code for all 3 forms may be identical.
:: 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)