package main
import "fmt"
import "unicode/utf8"
func RCIS(params string) int {
return utf8.RuneCountInString(params)
}
func VM(PRMS string) {
Q := len(PRMS) // byte数で回す
J := 0
M := 0
a := []int{0}
W := 0
for ; W < Q; W++ {
if PRMS[W] == 'P' {
a[J]++
} else if PRMS[W] == 'M' {
a[J]--
} else if PRMS[W] == 'Z' {
a[J] = 0
} else if PRMS[W] == 'S' {
M = a[J]
} else if PRMS[W] == 'D' {
a[J] = M
} else if PRMS[W] == 'R' {
J = (J+1)%len(a)
} else if PRMS[W] == 'A' {
a = append(a, 0)
} else if PRMS[W] == 'O' {
fmt.Print(string(rune(a[J])))
}
}
}
func main() {
k := "Hello"
fmt.Println(RCIS(k))
VM("PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPS ZARD PPPPPPPPO ZARD PPPPPO")
}
To embed this project on your website, copy the following code and paste it into your website's HTML: