Talk:Executable library: Difference between revisions

(→‎Pike problem: It needs to be one file.)
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 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.
: 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.
: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