Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does this VB6 variable declaration do?

I just found this in some old code, and I'm not sure what it means.

Dim sTemp As String * 1

What is the * 1 at the end?

Thanks!

like image 620
Matthew Cole Avatar asked Jul 22 '26 05:07

Matthew Cole


2 Answers

It means that the variable is a string of exactly one character in length.

Essentially, a fixed-length string.

like image 172
Mike Hofer Avatar answered Jul 23 '26 19:07

Mike Hofer


It's a fixed length string of one character. This was handy cause you could define a structure of fixed strings and read a file right into the structure.

like image 30
JoshBerke Avatar answered Jul 23 '26 18:07

JoshBerke



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!