CUSIP: Difference between revisions
→{{header|langur}}
(→{{header|Modula-2}}: Added MiniScript) |
Langurmonkey (talk | contribs) |
||
Line 2,988:
=={{header|langur}}==
If we don't strictly follow the pseudo-code, we can do this.
<syntaxhighlight lang=langur>val .isCusip = f(.s) {
if not isString(.s) or len(.s) != 9 {
Line 3,015 ⟶ 3,013:
Following the pseudo-code would look more like the following.
{{trans|Go}}
<syntaxhighlight lang=langur>val .isCusip = f(.s) {
Line 3,027 ⟶ 3,023:
var .v = 0
case >= '0', <= '9':
.v = .c-'0'
|