;This small utility creates a data section in raw binary format out of an external file.
;Useful for embedding small images directly within a source program etc,
;No error checking.
#linelength=40
inputfile$="back.ico"
outputfile$="data.pbi"
;Main program.
If CreateFile(1, outputfile$)
WriteStringN(1, ";"+inputfile$)
WriteStringN(1,"")
WriteStringN(1,"DataSection")
ReadFile(2, inputfile$)
line$=" Data.b "
While Eof(2) = 0
count+1
byte.c=ReadByte(2)
line$+Str(byte)
If count=#linelength
WriteStringN(1, line$)
line$=" Data.b "
count=0
Else
line$+", "
EndIf
Wend
If line$<> " Data.b "
WriteStringN(1, Left(line$, Len(line$)-2))
EndIf
CloseFile(2)
WriteStringN(1,"EndDataSection")
CloseFile(1)
Else
MessageRequester("Error!", "Problem creating output file!")
EndIf
I may look like a mule, but I'm not a complete ass.
well, I have 3 offices now at home......I try to choose the least messy...and avoid the ones where I see new life forms start to emerge...lets just say it my contibution to science!
My b*stard coffee mug has welded itself to the top of my desk and refuses to budge. I have to drink coffee from a straw now! Damn thing has an IQ in excess of my own now. Indeed, it's helping me debug some code here!
As for the bugs? Well they've moved into my laundry basket now and are busy creating a eutopian civilisation. The swines refuse to give me my socks back, -they were good for at least another 6 weeks or so!
Now who wins the slob of the year competition?
I may look like a mule, but I'm not a complete ass.