Another update from ingydotnet^djgoku

This commit is contained in:
Ingy döt Net 2015-11-18 06:14:39 +00:00
parent 91df62d461
commit 948b86eafa
7604 changed files with 108452 additions and 22726 deletions

View file

@ -0,0 +1,3 @@
BEGIN
print ((program idf, newline))
END

View file

@ -0,0 +1,2 @@
prog = basename(Base.source_path())
println("This program file is \"", prog, "\".")

View 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

View file

@ -0,0 +1,4 @@
Path to LB exe
C:\progs\Liberty BASIC v4.04\liberty.exe
current program file (:last one on LRU list)
C:\progs\Liberty BASIC v4.04\untitled.bas

View file

@ -1 +1 @@
say $*PROGRAM_NAME;
say $*PROGRAM-NAME;

View file

@ -0,0 +1,3 @@
# write this in file <program.ps1>
$MyInvocation.MyCommand.Name
# launch with <.\program>

View file

@ -1,5 +1,3 @@
// rust 0.8
fn main() {
println!("Program: {}", std::os::args()[0]);
println!("Program: {}", std::env::args().next().unwrap());
}