'============================================================
'=== This file was created with MakeDATA.bas by RhoSigma, ===
'=== you must $INCLUDE this at the end of your program. ===
'============================================================
'=====================================================================
'Function to write the embedded DATAs back to disk. Call this FUNCTION
'once, before you will access the represented file for the first time.
'After the call always use the returned realFile$ ONLY to access the
'written file, as the filename was maybe altered in order to avoid the
'overwriting of an existing file of the same name in the given location.
'---------------------------------------------------------------------
'SYNTAX: realFile$ = WriteQMCData$ (wantFile$)
'
'INPUTS: wantFile$ --> The filename you would like to write the DATAs
' to, can contain a full or relative path.
'
'RESULT: realFile$ --> On success the path and filename finally used
' after applied checks, use ONLY this returned
' name to access the file.
' -> On failure this FUNCTION will panic with the
' appropriate ERROR code, you may handle this as
' needed with your own ON ERROR GOTO... handler.
'=====================================================================
'--- separate filename body & extension ---
body$
= LEFT$(file$
, po%
- 1) body$ = file$
ext$ = ""
'--- avoid overwriting of existing files ---
num% = 1
file$
= body$
+ "(" + LTRIM$(STR$(num%
)) + ")" + ext$
num% = num% + 1
'--- write DATAs ---
rawdata$
= SPACE$((numL&
* 4) + numB&
)stroffs& = 1
MID$(rawdata$
, stroffs&
, 4) = MKL$(dat&
) stroffs& = stroffs& + 4
MID$(rawdata$
, stroffs&
, 1) = CHR$(dat&
) stroffs& = stroffs& + 1
'--- set result ---
WriteQMCData$ = file$
'--- DATAs representing the contents of file QMC.bas
'---------------------------------------------------------------------
QMC:
DATA &H5449545F,&H2220454C,&H746F7551,&H794D2065,&H646F4320,&H0A0D2265,&H52500A0D,&H20544E49 DATA &H69685422,&H69772073,&H64206C6C,&H6E6F6D65,&H61727473,&H202C6574,&H20776F68,&H20756F79 DATA &H206E6163,&H65626D65,&H68742064,&H6F632065,&H0D226564,&H4952500A,&H2220544E,&H20646E61 DATA &H74697277,&H74692065,&H63616220,&H6E69206B,&H61206F74,&H78742E20,&H622E2F74,&H6F207361 DATA &H68772072,&H76657461,&H222E7265,&H52500A0D,&H0D544E49,&H4952500A,&H2220544E,&H61656C50 DATA &H74206573,&H20657079,&H20656874,&H656C6966,&H6D616E20,&H6F742065,&H69727720,&H74206574 DATA &H63206568,&H2065646F,&H223A6F74,&H494C0A0D,&H4920454E,&H5455504E,&H69462220,&H203A656C DATA &H66202C22,&H500A0D24,&H544E4952,&H52500A0D,&H20544E49,&H61685422,&H79206B6E,&H202C756F DATA &H20656874,&H65646F63,&H726F6620,&H69687420,&H65642073,&H77206F6D,&H73207361,&H65636375 DATA &H75667373,&H22796C6C,&H52500A0D,&H20544E49,&H69727722,&H6E657474,&H746E6920,&H3B22206F DATA &H69725720,&H4D516574,&H74614443,&H66282461,&H0A0D2924,&H4E495250,&H0D0A0D54,&H4924270A DATA &H4E,&H43,&H4C,&H55,&H44,&H45,&H3A,&H20,&H27,&H51,&H4D,&H43,&H2E,&H62,&H6D,&H27