Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed 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: 53
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: 1,314
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

PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD
PPC: Qtek9000, 1GB SD

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: 1,687
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

When I needed a bit of HTML and complained about all the Chr(34)s member badkarma told me in this post Hyperlinks ? in this thread Hyperlinks ? 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 On
Pingbacks are On
Refbacks are On

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


All times are GMT. The time now is 01:23 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0