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

Some Hexadecimal formatting are failing for toStr() and format() #363

Open
lvcabral opened this issue May 2, 2024 · 0 comments
Open

Some Hexadecimal formatting are failing for toStr() and format() #363

lvcabral opened this issue May 2, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@lvcabral
Copy link
Owner

lvcabral commented May 2, 2024

The test cases below are failing:

  big_num = &H100000000&
  print big_num.ToStr("%d = 0x%0X") '
  '=> "4294967296 = 0x100000000"
  '  Failed shows "68719476736 = 0x0"

  ' Next 3 tests failed with Type Mismatch error

  '* example of using a dynamic field width parameter
  '* (left-side blank padding by default)
  print "%*X".Format(6, &hFACE1)
  '=> " FACE1"
  
  '* example of using a dynamic field width parameter,
  '* left-aligned to put the blank padding on the right
  print "%-*X".Format(6, &hFACE1)
  '=> "FACE1 "
  
  '* example of using a dynamic field width parameter,
  '* with left-side 0-padding
  print "%0*x".Format(8, &hFACE1)
  '=> "000face1"
@lvcabral lvcabral added the bug Something isn't working label May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant