1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
CmdLineOptions = BaseTask:new()
function CmdLineOptions:execute(myTable)
local masterTbl = masterTbl()
local usage = "Usage: f90continue [options] *.f *.f90 *.F *.F90"
local Optiks = require("Optiks")
local cmdlineParser = Optiks:new{usage=usage, error = Error}
cmdlineParser:add_option{
name = {'-v','--verbose'},
dest = 'verbosityLevel',
action = 'count',
help = 'Increasing the level of verbosity help output',
}
cmdlineParser:add_option{
name = {'-m','--ampersand'},
dest = 'column',
action = 'store',
type = 'number',
default = 81,
help = 'Minimum column where \'&\' will go',
}
local optionTbl, pargs = cmdlineParser:parse(arg)
for v in pairs(optionTbl) do
masterTbl[v] = optionTbl[v]
end
masterTbl.pargs = pargs
end
|