|
Post by dw817 on May 20, 2009 19:38:39 GMT -5
Hello: * Well, I'm still dabbling on that B4GL Font Editor, found a definite bug. Try this: ***** 4242424242Yep, it should give an error since you are trying to return a value from a numeric input when a string is expected. 
|
|
|
Post by UNDISCLOSED on May 21, 2009 3:44:27 GMT -5
That is wierd? And it still works when you put in a float instead of an integer?
|
|
|
Post by matthew on May 21, 2009 9:42:43 GMT -5
Personally I don't see what the big deal is, Basic4GL seems to be taking the numerical input & treating it as a string which is why I presume an error isn't occurring.
|
|
|
Post by DJLinux on May 21, 2009 15:53:36 GMT -5
it's a B4GL feature not a bug ;D if you declare the string param ByVal = default then B4GL will convert a number as string value but as a workaround you can declare the string param ByReffunction Repeat$(&c$,nTimes) dim i,a$ if nTimes<1 then return "":end if for i=1 to nTimes a$=a$+c$ next return a$ end function
' dim char$ = "*" dim a$=Repeat$(char$,5) printr a$ ' dim b$=Repeat$(42,5) ' now it's an error printr b$ end
|
|
|
Post by UNDISCLOSED on May 21, 2009 16:16:09 GMT -5
Ahh... now I get it.
|
|