We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sample.go
package main import ( "fmt" "math" "slices" "flag" "strings" ) func main() { nums := map[string]int{"I": 1, "V": 5, "X": 10} var II []string var NN []int var final string = "" var num float64 flag.Float64Var(&num, "n", 10.0, "Number") flag.Parse() for k, v := range nums { II = append(II, k) NN = append(NN, v) } slices.Reverse(II) slices.Reverse(NN) for _, cycle := range NN { t := int(math.Floor(num / float64(cycle))) final += strings.Repeat(II[slices.Index(NN, cycle)], t) num -= float64(cycle * (t)) } fmt.Printf("%v\n", final) }
$ go run ./sample.go -n=11 XI
$ yaegi ./sample.go -n=11 run: 498:22: undefined type for E
0.16.1
OS/Environment: Android 9 Go/Termux Device: ZTE Blade A3 2020 uname -a: "Linux localhost 4.4.147+ #1 SMP PREEMPT Tue Sep 29 02:20:41 CST 2020 armv7l Android" go version: "go version go1.23.2 android/arm"
uname -a
go version
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The following program
sample.go
triggers an unexpected resultExpected result
Got
Yaegi Version
0.16.1
Additional Notes
OS/Environment: Android 9 Go/Termux
Device: ZTE Blade A3 2020
uname -a
: "Linux localhost 4.4.147+ #1 SMP PREEMPT Tue Sep 29 02:20:41 CST 2020 armv7l Android"go version
: "go version go1.23.2 android/arm"The text was updated successfully, but these errors were encountered: