Re: Please - Simple is better

From: Date: Tue, 19 Aug 2003 04:33:38 +0000
Subject: Re: Please - Simple is better
References: 1 2 3 4 5  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969355920@lists.php.net to get a copy of this message
On Mon, 2003-08-18 at 18:13, Hafid wrote: > Thanks a lot Lars. > > It is helpful. Now I would like to ask you, please, what would you do with > these two senteces and phrase? > > /* stat a wrapped stream */ > /* stat a URL */ > struct stat > > > > The problem is in stat ???? It's fairly common these days in English to use nouns as though they were verbs (you might say we like to 'verb our nouns'). This is one of those things which makes sense to us but which can be confusing for non-native speakers. So the first sentence means 'perform a stat operation on a wrapped stream', and the second means 'perform a stat operation on a URL'. As for the 'struct stat': In C, you can define arbitrary data structure types using the 'struct' keyword, and then create variables of those types. Say you wanted a data structure with personal information. You could do something like this: struct person { char first_name[51]; char last_name[51]; char phone_number[12]; }; ...which creates a template for a data structure containing spots to store a first name, last name, and phone number. Then you could create a variable using this structure, and store some data into it: struct person torben; This creates a variable called 'torben' with the structure I defined earlier. You can then access the individual parts of this variable by using torben.first_name, torben.last_name, etc. In short, it's something like PHP's arrays, but PHP's arrays are much higher-level (easier to use and less work to figure out). A really good thing would be find a beginner's book on the C language, since that would be able to go into far more depth. As to what a 'stat' actually is: it's just a collection of information about something, such as a file or a stream. In the C language, you use a function called 'fstat()' to gather this information; it is returned to you in a struct. This might contain information on file creation time, permissions, etc. > Derick told me [It was just a generally used computer science concept; he > doubt it can be > translated at all. (They didn't do it for Dutch for example).] I agree with Derick; you would likely just confuse people by attempting to translate concepts like these; they are generally referred to in English regardless of where you are. > I just need to know the function of this "creature" if I can say: struct > stat It just defines a data structure called 'stat'. > Regards :) > > Hafid Hope this helps, Torben -- Torben Wilson <torben@php.net> +1.604.709.0506 http://www.thebuttlesschaps.com http://www.inflatableeye.com http://www.hybrid17.com http://www.themainonmain.com -----==== Boycott Starbucks! http://www.haidabuckscafe.com ====-----

« previous php.doc (#969355920) next »