Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Request a Tutorial
Index -> Programming, Turing -> Turing Tutorials
Goto page Previous  1, 2, 3, 4, 5 ... 16, 17, 18  Next
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
junkpro11




PostPosted: Wed May 05, 2004 8:53 pm   Post subject: (No subject)

ok....actually i experimented and kinda got it

THANKS
Sponsor
Sponsor
Sponsor
sponsor
junkpro11




PostPosted: Sun May 09, 2004 9:53 am   Post subject: (No subject)

oh....how do u create a record in turing

like if i want to save the info i put into a new file Embarassed

is it read/write? when i saw the tutorial is just reading from a file or writing to a file....not making a new file

im new to this...please forgive me if i seem like a complete retard
AsianSensation




PostPosted: Sun May 09, 2004 3:55 pm   Post subject: (No subject)

I would suggest you understand simple file I/O, tutorial could be found here:

http://www.compsci.ca/v2/viewtopic.php?t=65
junkpro11




PostPosted: Sun May 09, 2004 9:46 pm   Post subject: (No subject)

i understand the input output...i want to know who to save a record

eg. i created student record
array 1..100 lets just say


i want to write a procedure that can add a student record, and save it in a seperate file and can be used later....sort of like a database
AsianSensation




PostPosted: Sun May 09, 2004 10:10 pm   Post subject: (No subject)

http://www.compsci.ca/v2/viewtopic.php?t=2325

tutorial for making a record.

To save and get a group of data for an array of records, just make sure you know the order in which to get, like which line corresponds to which variable.
not_l33t




PostPosted: Thu May 13, 2004 7:35 pm   Post subject: (No subject)

I suggest a tutorial on simple sequencing and functions. Like the one I was taught:

code:
fcn fib (a : int, b : int) : int
    put b
    delay (1000)
    result fib (b, a + b)
end fib

put 1
put fib (1, 1)


Thanks to the dude with the picture of Mao.
LiquidDragon




PostPosted: Sun May 16, 2004 5:09 pm   Post subject: (No subject)

Ok what about a fork tutorial? I still dont understand the benefits of it. All i know is it can pick something random from two of them. That doesn't make sense. well i looked at the on in the help file and it still doesnt make sense Confused
Tony




PostPosted: Sun May 16, 2004 5:54 pm   Post subject: (No subject)

LiquidDragon wrote:
I still dont understand the benefits of [fork]

good, cuz processes are bad and you shouldn't be using them Naughty
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Sponsor
Sponsor
Sponsor
sponsor
Ultimus




PostPosted: Sun May 16, 2004 11:47 pm   Post subject: (No subject)

Processes aren't bad, just the ways most people use them are bad.

They're great for multiuser interfaces like multiplayer games. But as most people use them, yeah, they are just creative ways of halving cpu speed.
Tony




PostPosted: Mon May 17, 2004 10:56 am   Post subject: (No subject)

no, processes suck for multiplayer games. Because each player gets a random ammount of CPU time.

When properly structured, processes are not needed to run users parallel to each other in a multiplayer game
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Mazer




PostPosted: Mon May 17, 2004 2:38 pm   Post subject: (No subject)

I think he may have meant multiplayer as in two people at one computer. And sure it's perhaps 'frowned upon' but if used correctly they aren't so bad.
Dan




PostPosted: Mon May 17, 2004 3:13 pm   Post subject: (No subject)

Yep, it is all in how u use them. Also if you have more then one CPU in a computer process can be usesfull to use the full potionel of the computer since there are more then one CPU u whould aucaly be ruing the code at the same time and not ramdoly intermixed. This could also be helpfull with system with multy threading.

BUT....I do not think there is any comand in turing that will tell u how many CPUs are in a computer so this whould not be veryprobale. Basicky procouse can be dangeruers when you do not funny undersatnd how they work alougth they do have proupose in some cases.
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
Tony




PostPosted: Mon May 17, 2004 6:55 pm   Post subject: (No subject)

Hacker Dan wrote:
they do have proupose in some cases.

processes had a purpose while Music.PlayFileReturn was not there Laughing
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Paul




PostPosted: Mon May 17, 2004 7:05 pm   Post subject: (No subject)

That command only works on 4.0.5, its still processes for those schools who didn't catch on fast enough.
Mazer




PostPosted: Mon May 17, 2004 7:35 pm   Post subject: (No subject)

Yeah, I was just going to point that out

code:

process PlayFileReturnProc (fileStr : string)
    PlayFile (fileStr)
end PlayFileReturnProc

procedure PlayFileReturn (fileStr : string)
    fork PlayFileReturnProc (fileStr)
end PlayFileReturn

Laughing
Display posts from previous:   
   Index -> Programming, Turing -> Turing Tutorials
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 4 of 18  [ 261 Posts ]
Goto page Previous  1, 2, 3, 4, 5 ... 16, 17, 18  Next
Jump to:   


Style:  
Search: