Another update from ingydotnet^djgoku
This commit is contained in:
parent
91df62d461
commit
948b86eafa
7604 changed files with 108452 additions and 22726 deletions
3
Task/Program-name/ALGOL-68/program-name.alg
Normal file
3
Task/Program-name/ALGOL-68/program-name.alg
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
BEGIN
|
||||
print ((program idf, newline))
|
||||
END
|
||||
2
Task/Program-name/Julia/program-name.julia
Normal file
2
Task/Program-name/Julia/program-name.julia
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
prog = basename(Base.source_path())
|
||||
println("This program file is \"", prog, "\".")
|
||||
41
Task/Program-name/Liberty-BASIC/program-name-1.liberty
Normal file
41
Task/Program-name/Liberty-BASIC/program-name-1.liberty
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
|
||||
4
Task/Program-name/Liberty-BASIC/program-name-2.liberty
Normal file
4
Task/Program-name/Liberty-BASIC/program-name-2.liberty
Normal 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
|
||||
|
|
@ -1 +1 @@
|
|||
say $*PROGRAM_NAME;
|
||||
say $*PROGRAM-NAME;
|
||||
|
|
|
|||
3
Task/Program-name/PowerShell/program-name.psh
Normal file
3
Task/Program-name/PowerShell/program-name.psh
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# write this in file <program.ps1>
|
||||
$MyInvocation.MyCommand.Name
|
||||
# launch with <.\program>
|
||||
|
|
@ -1,5 +1,3 @@
|
|||
// rust 0.8
|
||||
|
||||
fn main() {
|
||||
println!("Program: {}", std::os::args()[0]);
|
||||
println!("Program: {}", std::env::args().next().unwrap());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue