
-----------------------------------
CentiZen
Tue May 12, 2009 10:39 am

Turing Shell
-----------------------------------
I've been tinkering around with turing for quite a while now, and I decided that for my first major projects I would make a shell. So far its been going great. I've had a few issues with things like manually setting colours, and clearscreen. I just thought I'd post it so I could get some feedback on it, tips tricks, suggestions... please, no bad feedback or unconstructive critisism, I am just learning to code.

%Var declarations
var changedir, menuchoice, delpathname, rmdirpath, copysourcefile, copydestfile, renamefilepath, newname : string
var colortype, newcolor : int

procedure pwdcommand %This command prints out the working directory of the program
put Dir.Current
end pwdcommand

procedure colorcommand %currently not working
get newcolor
colortype := newcolor
end colorcommand

procedure clscommand %again, currently not working
cls
end clscommand
 
procedure delcommand %deletes a file
get delpathname
File.Delete (delpathname)
if Error.Last = eNoError then
    put skip, delpathname, " deleted"
else
    put skip, "Did not delete ", delpathname
    put "Error: ", Error.LastMsg
end if

end delcommand

procedure helpcommand %displays a list of commands and how to use them
color (10)
put "Name       Description/instructions (if available)"
color (36)
put "CD         Changes the working directory 

I have alot to add to this, I just thought I would post it up for some criticism.

-----------------------------------
BigBear
Tue May 12, 2009 2:10 pm

RE:Turing Shell
-----------------------------------
http://compsci.ca/v3/viewtopic.php?t=12068&highlight=shell

I think this might be helpful it seems to have a few problem like typing cd C:\ opens the C drive in explorer also dir doesn't work on either

-----------------------------------
WOIKeller
Thu Oct 22, 2009 10:01 am

RE:Turing Shell
-----------------------------------
This program is probably the best program I could use. Thanks +2 bits...

Keep up the good work!

-----------------------------------
Insectoid
Thu Oct 22, 2009 1:23 pm

RE:Turing Shell
-----------------------------------
This 'shell' is just a repackaging of the Windows shell in Turing. By all means, keep on this, but I suggest doing a lot of things manually. Keeping a tab on the actual directory and changing it within the code instead of referencing Window's chdir (or cd) command would be more challenging and more impressive when complete.

-----------------------------------
andrew.
Thu Oct 22, 2009 1:28 pm

RE:Turing Shell
-----------------------------------
I made one a while ago like this. I made it so that when it doesn't understand the command, it will ask if you want to run it as a Windows command, and I used Sys.Exec to run it if they said yes.
