Difference between revisions of "Template:Decdeg/testcases"
Jump to navigation
Jump to search
imported>Droll (added an example that uses invalid syntax) |
imported>Droll (→An example using poor syntax: tried to clarify results) |
||
| Line 1: | Line 1: | ||
== An example using poor syntax == | == An example using poor syntax == | ||
| + | In this example the values in the pre box are converted to decimal degrees by this template and converted back to degree, minute, second format by {{tl|Coord}}. | ||
<pre style="width:200px; float: left; margin-right: 20px"> | <pre style="width:200px; float: left; margin-right: 20px"> | ||
{{decdeg | {{decdeg | ||
| Line 18: | Line 19: | ||
</pre> | </pre> | ||
{| class="wikitable" style="text-align: center; width: 250px;" | {| class="wikitable" style="text-align: center; width: 250px;" | ||
| + | |+ This syntax is not supported by {{tlf|Coord}} | ||
|- | |- | ||
| {{coord|37|51|00|N|-119|-34|-04|format=dec}} | | {{coord|37|51|00|N|-119|-34|-04|format=dec}} | ||
|- | |- | ||
| − | | {{decdeg|deg=37|min=51|sec=00|hem=N|rnd=}} | + | | {{Coord|{{decdeg|deg=37|min=51|sec=00|hem=N|rnd=}}|{{decdeg|deg=-119|min=-34|sec=-04|hem=}}|format=dms}} || Working |
|- | |- | ||
| − | | {{decdeg/sandbox|deg=37|min=51|sec=00|hem=N|rnd=}} | + | | {{Coord|{{decdeg/sandbox|deg=37|min=51|sec=00|hem=N|rnd=}}|{{decdeg/sandbox|deg=-119|min=-34|sec=-04|hem=}}|format=dms}} || Sandbox |
|} | |} | ||
{{clr}} | {{clr}} | ||
Revision as of 23:52, 12 May 2012
An example using poor syntax
In this example the values in the pre box are converted to decimal degrees by this template and converted back to degree, minute, second format by {{Coord}}.
{{decdeg
| deg = 37
| min = 51
| sec = 00
| hem = N
| rnd =
}},
{{decdeg
| deg = -119
| min = -34
| sec = -04
| hem =
| rnd =
}}
| Lua error: callParserFunction: function "#coordinates" was not found. | |
| Lua error: callParserFunction: function "#coordinates" was not found. | Working |
| Lua error: callParserFunction: function "#coordinates" was not found. | Sandbox |
Good syntax
{{decdeg
| deg = 37
| min = 51
| sec = 00
| hem = N
| rnd =
}},
{{decdeg
| deg = 119
| min = 34
| sec = 04
| hem = W
| rnd =
}}
| Lua error: callParserFunction: function "#coordinates" was not found. | |
| 37.85, -119.5677778 | Working |
| Expression error: Unexpected < operator., Expression error: Unexpected < operator. | Sandbox |
{{decdeg
| deg = 37
| min = 51
| hem = N
| rnd =
}},
{{decdeg
| deg = 119
| min = 34
| hem = W
| rnd =
}}
| Lua error: callParserFunction: function "#coordinates" was not found. | |
| 37.85, -119.5666667 | Working |
| Expression error: Unexpected < operator., Expression error: Unexpected < operator. | Sandbox |
{{decdeg
| deg = 37
| hem = N
}},
{{decdeg
| deg = 119
| hem = W
}}
| Lua error: callParserFunction: function "#coordinates" was not found. | |
| 37, -119 | Working |
| Expression error: Unexpected < operator., Expression error: Unexpected < operator. | Sandbox |
{{decdeg
| deg = 37.849923
| hem = N
}},
{{decdeg
| deg = 119.567666
| hem = W
}}
| Lua error: callParserFunction: function "#coordinates" was not found. | |
| 37.849923, -119.567666 | Working |
| Expression error: Unexpected < operator., Expression error: Unexpected < operator. | Sandbox |
{{decdeg
| deg = 37.849923
}},
{{decdeg
| deg = -119.567666
}}
| Lua error: callParserFunction: function "#coordinates" was not found. | |
| 37.849923, -119.567666 | Working |
| Expression error: Unexpected < operator., Expression error: Unexpected < operator. | Sandbox |
{{decdeg}},
{{decdeg}}
| Lua error: callParserFunction: function "#coordinates" was not found. | |
| 0, 0 | Working |
| Expression error: Unexpected < operator., Expression error: Unexpected < operator. | Sandbox |
{{decdeg| deg = -0}},
{{decdeg| deg = -0}}
| Lua error: callParserFunction: function "#coordinates" was not found. | |
| -0, -0 | Working |
| Expression error: Unexpected < operator., Expression error: Unexpected < operator. | Sandbox |
{{decdeg
| deg = 0.85
| min =
| sec =
| hem =
| rnd = 5
}},
{{decdeg
| deg = -0.5677778
| min =
| sec =
| hem =
| rnd = 5
}}
| Lua error: callParserFunction: function "#coordinates" was not found. | |
| 0.85, -0.56778 | Working |
| Expression error: Unexpected < operator., Expression error: Unexpected < operator. | Sandbox |