Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
41
Task/Program-name/Liberty-BASIC/program-name-1.basic
Normal file
41
Task/Program-name/Liberty-BASIC/program-name-1.basic
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
nSize = _MAX_PATH + 2
|
||||
lpFilename$ = space$(nSize); chr$(0)
|
||||
|
||||
calldll #kernel32, "GetModuleFileNameA", _
|
||||
hModule as ulong, _
|
||||
lpFilename$ as ptr, _
|
||||
nSize as ulong, _
|
||||
result as ulong
|
||||
lpFilename$ = left$(lpFilename$,result)
|
||||
|
||||
print "Path to LB exe"
|
||||
print lpFilename$
|
||||
print "current program file (:last one on LRU list)"
|
||||
print getLastLRU$(lbPath$)
|
||||
end
|
||||
|
||||
Function getLastLRU$(lbPath$)
|
||||
open lbPath$+"lbasic404.ini" for input as #1
|
||||
while not(eof(#1))
|
||||
line input #1, a$
|
||||
if instr(a$, "recent files")<>0 then [readRecentFiles]
|
||||
wend
|
||||
getLastLRU$ = "* Failed: Recent files section not found *"
|
||||
close #1
|
||||
exit function
|
||||
|
||||
[readRecentFiles]
|
||||
nRecent = val(word$(a$,1))
|
||||
'print "nRecentFiles", nRecent
|
||||
for i = 1 to nRecent
|
||||
if eof(#1) then
|
||||
getLastLRU$ = "* Failed: File ended while in recent files section *"
|
||||
close #1
|
||||
exit function
|
||||
end if
|
||||
line input #1, a$
|
||||
'print i, a$
|
||||
next
|
||||
close #1
|
||||
getLastLRU$ = a$
|
||||
end function
|
||||
Loading…
Add table
Add a link
Reference in a new issue