What confused me until someone explained it to me was that USE is both the command to open a table and to close it. Well, the simple way to see it is to realize it does both at the same time.
And there are two cases:
a) you specify no IN clause, which means USE works in the current workarea.
In that case USE closes whatever is in the current workarea and opens the DBF file you specify by file name or just filename (dbf is assumed) or by database!tablename
b) you specify an IN clause, which means USE works in that specified workarea.
Otherwise nothing else changes, you close what is in THAT workarea and open the dbf file you specify.
There are special cases like the simplest - a USE alone, without any further clauses. It means you close what is in the current workarea and don't specify a file to open, thus you only close a DBF file.
The variations USE IN aliasname or USE in number both also don't specify what to open, so they only close what is in that workarea by alias name or workarea number.
Once you know that, USE and all its variations and clauses are less scary. Or not?
The clauses about ORDER, or about SHARED/EXCLUSIVE usage, and some more clauses like AGAIN can go anywhere else, and I agree you best write it the way it makes the most sense to you.
Chriss
PS: You use SELECT 0, Trento777 also mentioned the IN clause with 0. So I know I don't need to explain 0 is a special workarea number which is the first empty workarea. This way you don't need to track which workarea numbers you used and which not. In very early versions of FoxPro you only had a few workareas, now the number is practically unlimited, thus it makes sense to have this special workarea number to otherwise work with alias names. It can be very useful to first SELECT 0 and then USE something instead of doing USE something IN 0 in one command, because in the former case you know the selected workarea is the one the new file is opened in, in the latter case with the IN clause you open a file in an empty workarea, but don't select it. That can be fine in the case you have to open very many tables. Then you can SELECT one of them as last step. Anyway you do it, you do an extra SELECT either before or after USE, so it's just a matter of taste how you do it.