Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

Long String

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-06-2008, 06:35 AM
Knows the basics
 
Join Date: Jan 2008
Posts: 78
Default Long String

I need long strings to put it in a variable p.E.
Kopf = "<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.1">
<Document>
<Placemark>
<name>CDATA example</name>
<description>"

that doesn't work, I know. Is there a chance to do it like in Perl

$kopf = qq~
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.1">
<Document>
<Placemark>
<name>CDATA example</name>
<description>
~;

Thanks for help
Reply With Quote
  #2 (permalink)  
Old 08-06-2008, 08:23 AM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 2,313
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

You have quotes inside your string...
So when you have A="this is a "Quote"" you should use A= "This is " & Chr(34) & "Quote" & chr(34)


Kopf = "<?xml version=" & Chr(34) & "1.0" & Chr(34) & "encoding=" & Chr(34) & "UTF-8" & Chr(34) & "?>" & crlf & - This forces the line break
"<kml xmlns=" & Chr(34) & "http://earth.google.com/kml/2.1" & Chr(34) & ">" & crlf &
"<Document>" & crlf &
"<Placemark>" & crlf &
"<name>CDATA example</name>" & crlf &
"<description>"
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France-Saumur
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate)
B4PPC DLL Version Listing - B4Android DLL Version Listing

Last edited by Cableguy : 08-06-2008 at 08:29 AM.
Reply With Quote
  #3 (permalink)  
Old 08-06-2008, 09:20 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 5,953
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

When I needed a bit of HTML and complained about all the Chr(34)s member badkarma told me in this post http://www.basic4ppc.com/forum/10707-post16.html in this thread http://www.basic4ppc.com/forum/quest...erlinks-2.html that you can use single quotes instead, this makes the code much more readable.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Display a long HTML string N1c0_ds Questions (Windows Mobile) 7 11-08-2008 09:02 PM
ContextMenu and center button long press N1c0_ds Questions (Windows Mobile) 1 11-03-2008 04:56 AM
put byte value into a string cotralis Questions (Windows Mobile) 5 09-13-2008 04:30 AM
OK, next string question Stellaferox Questions (Windows Mobile) 9 06-07-2007 02:12 PM
Quick question to avoid going down a long dead end route LineCutter Questions (Windows Mobile) 2 05-22-2007 08:29 AM


All times are GMT. The time now is 09:55 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0