[Gambas-user] Print variables without spaces?

nando nando_f at ...951...
Wed Dec 26 21:50:48 CET 2007


Double check the length of each string
Print LEN(your_movie)
Print LEN(TextBox2.Text)
and see if they are as expected.
You could use trim$ also.
Users have a habit of typing in spaces in text boxes.
I've seen leading and trailing spaces cause problems over the years.
Expect dirty data from humans.


DIM a AS String
a=chr$(13)  
...then use 'a' as you need for the CR

-Fernando


---------- Original Message -----------
From: Stefano Palmeri <rospolosco at ...152...>
To: mailing list for gambas users <gambas-user at lists.sourceforge.net>
Sent: Sun, 23 Dec 2007 21:55:27 +0100
Subject: Re: [Gambas-user] Print variables without spaces?

> Alle 21:02, domenica 23 dicembre 2007, lawrence pires ha scritto:
> > Only found Gambas over the weekend and have been hooked.
> > But im stuck and m wondering if any of you will help me,
> >
> > I have 2 variables and im trying to print both without a space in between?.
> >
> > Heres my problem.
> >
> > DIM your_movie AS String
> > your_movie = "/your_video.mpg"
> >
> > PRINT Textbox2.Text, your_movie
> >
> > the above outputs
> > /home   /your_video.mpg
> >
> > I need it to print
> > /home/your_video.mpg
> 
> PRINT Textbox2.Text; your_movie
> 
> or
> 
> PRINT Textbox2.Text & your_movie
> 
> Gambas has an online help. In Gambas2 is under ?-->Help browser.
> I don't remember Gambas1
> 
> Ciao.
> 
> >
> > On another note:
> > Im after some documentation on how to create new lines, carriage returns,
> > spaces in strings and also in Print
> >
> > email me piresl at ...626...
> >
> > Thanks for reading
> > -------------------------------------------------------------------------
> > This SF.net email is sponsored by: Microsoft
> > Defy all challenges. Microsoft(R) Visual Studio 2005.
> > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> > _______________________________________________
> > Gambas-user mailing list
> > Gambas-user at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gambas-user
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
------- End of Original Message -------





More information about the User mailing list