Thomas (boggyb) wrote,

  • Mood:
  • Music:

I have a small snippet of code here, written in Visual Basic 6. Guess what it does:

Dim s As String
s = String(2, "0")
Debug.Print s

I'll give you a hint: it doesn't do what I wanted it to do.

Ok, I'm a fool. That code does what I want it to do. The following code in my program:

RSet s = Hex(1)

most certainly does not do what I wanted it to do, as it appears that RSet will replace leftover characters with spaces. Which kind of negates the whole point of padding the string with zeros in the first place. Grrr.

Tags: programming

  • Skyward Sword HD: for SCIENCE!

    One thing I've noticed from playing through Skyward Sword HD is how... underwhelming the skyward strike appears, at least to begin with. It takes a…

  • Random quote

    pleaseremove, setting a work quiz: "No, I'm going to get my wrong answers right"

  • E3 WOT WOT!

    There's quite a few games in the Nintendo Direct, so here's what caught my eye... Super Monkey Ball Banana Mania: I'd completely forgotten about…

  • Post a new comment


    default userpic
    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.