|
Post by billw on Feb 24, 2008 15:51:38 GMT -5
This should cause an invalid function name error:
function dim(x) print "dim:x" dim = x end function
RB complains when I try to set dim's value. Go figure.
I'd expect left() and the like to be an invalid function name, too. This:
hello$ = "Finland" print "Go to "; left(hello$, 3)
yields an ambiguous type mismatch error. Or perhaps you could add a Google-like "Did you mean..." feature?
|
|
|
Post by carlgundel on Feb 24, 2008 22:51:17 GMT -5
This should cause an invalid function name error: function dim(x) print "dim:x" dim = x end function RB complains when I try to set dim's value. Go figure. RB doesn't consider dim( and dim to be the same token. Technically dim( is not an invalid function name. However dim is a reserved word and cannot be a variable. Why? left( and left$( are not the same thing at all. Run BASIC thinks that left(hello$, 3) is an array reference. Arrays do not accept string parameters. I'll what I can do to make the error refer to the array named left. -Carl
|
|
|
Post by Jerry Muelver on Feb 25, 2008 21:35:35 GMT -5
Or, just give us an array that accepts string parameters.... A little hash can really pep up a breakfast platter!
|
|
|
Post by carlgundel on Feb 25, 2008 22:20:21 GMT -5
Or, just give us an array that accepts string parameters.... A little hash can really pep up a breakfast platter! I'm interested in adding a hash to RB, but I'm going to be careful how I do it. -Carl
|
|
|
Post by billw on Mar 27, 2008 19:50:59 GMT -5
This should cause an invalid function name error: function dim(x) print "dim:x" dim = x end function RB complains when I try to set dim's value. Go figure. RB doesn't consider dim( and dim to be the same token. Technically dim( is not an invalid function name. However dim is a reserved word and cannot be a variable. In LB4, this causes an invalid function name error. Rightly so, I might add, because there isn't any way to return a value from a function named dim(). The current implementation is broken. Please fix it.
|
|