torkell: (Default)
[personal profile] torkell

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.

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

January 2026

S M T W T F S
     123
45678910
11121314151617
18192021222324
25262728293031

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated May. 8th, 2026 05:42 am
Powered by Dreamwidth Studios