Skip to content
New issue

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

cast.ToUint32("0134444") = 47396 #232

Open
bb7788 opened this issue Jan 7, 2025 · 1 comment
Open

cast.ToUint32("0134444") = 47396 #232

bb7788 opened this issue Jan 7, 2025 · 1 comment

Comments

@bb7788
Copy link

bb7788 commented Jan 7, 2025

cast.ToUint32("0134444") = 47396

my go version go1.23.4 darwin/amd64, cast version 1.71

@yamadev11
Copy link

Most programming languages of the C-family including Go treat integer numbers as octal if starting with 0 and hex if starting with 0x. Here it is starting with 0 hence considered as octal but decimal and resulted into different number than your expectation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants