On Aug 16, 2006, at 10:13 PM, Brian Heibert wrote:

I have a thought,

pict1 = VAL(pushbutton1.caption)

That didn't work above

Is there a way to find out how many characters (includng spaces) are in a string of text or in my case a caption?

Brian

Brian

READ THE DOCUMENTATION on what VAL does. The online language reference is your friend.

VAL converts a string into a number if it can do so sensibly

Then test it for yourself with

        dim i as integer
        dim s as string

        i = val("123")

and note that i ends up having the numeric value 123

Now look at what you did and see why that made no sense

Do this BEFORE posting here with your questions


I realize you have been working with REALbasic for a while but you still seen to try the first thing that pops up.
When it fails you post to the list. Please DON'T do that.
While there are lots of helpful people, this is not a private tutoring list. Try EVERYTHING you can think of to make it work and understand WHY the things that work do work and why the things that do not work don't.



As for your question try "len" instead of "val"

        
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to