Restored from previous forum. Originally posted by Fangbeast.
I'm having trouble putting a HTML page (which I need to do) as each line stored in a DATA statement.
I replace the literal quote marks with CHR(34) but am still getting a syntax error. Am I missing something??
Original line
" style="font-family: MS Sans Serif; font-size: 8pt; margin-top: 0; margin-bottom: 0">
Replacement
""+chr(34)+" style="+chr(34)+"font-family: MS Sans Serif; font-size: 8pt; margin-top: 0; margin-bottom: 0"+chr(34)+">"
Anyone have an idea what I am doing wrong??
You be quiet _Paul_ !!! (GRIN)
Fangles
HTML page as DATA statements
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by Fangbeast.
And besides, I have alreay worked out the problem and am fixing a JavaScript error that I inadvertently made but thanks anyway or person who know everything
:):)
Fangles
Gee, i'm so glad you are bing quiet and not lurking and behaving yourself as I know that' quite unlike you (very evil grin)OK Fangs... I'll be quite and not tell you that HTML can use ' instead of "
so your line could be:
' style='font-family: MS Sans Serif; font-size: 8pt; margin-top: 0; margin-bottom: 0'>
But of course I'm being quite and not telling you this.
And besides, I have alreay worked out the problem and am fixing a JavaScript error that I inadvertently made but thanks anyway or person who know everything
Fangles
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by Danilo.
Hmm...
this code:
generates this file (c:\stringoutput.txt):
You can include this file in your sourcecode.
Little Test:
But i´m too late anyway...
cya,
...Danilo
(registered PureBasic user)
Hmm...
this code:
Code: Select all
OpenFile(1,"c:\stringoutput.txt")
A$ = ""+Chr(34)+" style="+Chr(34)+"font-family: MS Sans Serif; font-size: 8pt; margin-top: 0; margin-bottom: 0"+Chr(34)+">"
WriteStringN("DataSection")
WriteStringN("Label:")
WriteString("Data.b ")
For a = 0 To Len(A$)
WriteString("$"+Hex(PeekB(@A$+a)))
WriteString(",")
Next a
WriteStringN("0")
WriteStringN("")
WriteStringN("EndDataSection")
CloseFile(1)Code: Select all
DataSection
Label:
Data.b $3C,$62,$6F,$64,$79,$20,$62,$67,$63,$6F,$6C,$6F,$72,$3D,$22,$3C,$48,$49,$56,$5F,$63,$6F,$6C,$6F,$75,$72,$3E,$22,$20,$73,$74,$79,$6C,$65,$3D,$22,$66,$6F,$6E,$74,$2D,$66,$61,$6D,$69,$6C,$79,$3A,$20,$4D,$53,$20,$53,$61,$6E,$73,$20,$53,$65,$72,$69,$66,$3B,$20,$66,$6F,$6E,$74,$2D,$73,$69,$7A,$65,$3A,$20,$38,$70,$74,$3B,$20,$6D,$61,$72,$67,$69,$6E,$2D,$74,$6F,$70,$3A,$20,$30,$3B,$20,$6D,$61,$72,$67,$69,$6E,$2D,$62,$6F,$74,$74,$6F,$6D,$3A,$20,$30,$22,$3E,$0,0
EndDataSection
Little Test:
Code: Select all
OpenConsole()
PrintN(PeekS(?Label))
Delay(3000)
End
DataSection
Label:
Data.b $3C,$62,$6F,$64,$79,$20,$62,$67,$63,$6F,$6C,$6F,$72,$3D,$22,$3C,$48,$49,$56,$5F,$63,$6F,$6C,$6F,$75,$72,$3E,$22,$20,$73,$74,$79,$6C,$65,$3D,$22,$66,$6F,$6E,$74,$2D,$66,$61,$6D,$69,$6C,$79,$3A,$20,$4D,$53,$20,$53,$61,$6E,$73,$20,$53,$65,$72,$69,$66,$3B,$20,$66,$6F,$6E,$74,$2D,$73,$69,$7A,$65,$3A,$20,$38,$70,$74,$3B,$20,$6D,$61,$72,$67,$69,$6E,$2D,$74,$6F,$70,$3A,$20,$30,$3B,$20,$6D,$61,$72,$67,$69,$6E,$2D,$62,$6F,$74,$74,$6F,$6D,$3A,$20,$30,$22,$3E,$0,0
EndDataSectioncya,
...Danilo
(registered PureBasic user)
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm