Jump to content

Module:Val

From Simple English Wikipedia, the free encyclopedia
Revision as of 15:07, 7 January 2015 by The Mol Man (talk | changes) (just a start of sorts I guess)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This module implements {{Val}}.

The following modules are developed:

Use {{val/sandboxlua}} for testing, for example:

  • {{val/sandboxlua|1234.5678|(23)|u=cm}}1234.5678(23) cm
  • {{val/sandboxlua|1234.5678|1.23|u=cm}}1234.5678±1.23 cm
  • {{val/sandboxlua|1234.5678|1.23|4.56|u=cm}}1234.5678+1.23
    −4.56
     cm
  • {{val/sandboxlua|1234.5678|e=3|u=cm}}1234.5678×103 cm
  • {{val/sandboxlua|1234.5678|(23)|e=3|u=cm}}1234.5678(23)×103 cm
  • {{val/sandboxlua|1234.5678|1.23|e=3|u=cm}}(1234.5678±1.23)×103 cm
  • {{val/sandboxlua|1234.5678|1.23|4.56|e=3|u=cm}}1234.5678+1.23
    −4.56
    ×103 cm
  • {{val/sandboxlua|1234.5678|1.23|4.56|e=3|u=cm|end=$|+errend=U$|-errend=L$}}1234.5678$+1.23U$
    −4.56L$
    ×103 cm
  • {{val/sandboxlua|1234.5678|(23)|u=deg}}1234.5678(23)°
  • {{val/sandboxlua|1234.5678|1.23|u=deg}}1234.5678°±1.23°
  • {{val/sandboxlua|1234.5678|1.23|4.56|u=deg}}1234.5678°+1.23°
    −4.56°
  • {{val/sandboxlua|1234.5678|e=3|u=deg}}1234.5678°×103
  • {{val/sandboxlua|1234.5678|(23)|e=3|u=deg}}1234.5678(23)°×103
  • {{val/sandboxlua|1234.5678|1.23|e=3|u=deg}}(1234.5678°±1.23°)×103
  • {{val/sandboxlua|1234.5678|1.23|4.56|e=3|u=deg}}1234.5678°+1.23°
    −4.56°
    ×103
  • {{val/sandboxlua|1234.5678|1.23|4.56|e=3|u=deg|end=$|+errend=U$|-errend=L$}}1234.5678$°+1.23U$°
    −4.56L$°
    ×103

local p = {}
 
local getArgs
local gaps = require('Module:Gapnum')._gaps

function p.main(frame)
	if not getArgs then
		getArgs = require('Module:Arguments').getArgs
	end
	local args = getArgs(frame, {wrappers = 'Template:Val'})
end

return p