Previous Thread
Next Thread
Print Thread
compil/x:2 broken? #29757 04 Apr 07 09:41 AM
Joined: Jun 2001
Posts: 11,645
J
Jack McGregor Online Content OP
Member
OP Online Content
Member
J
Joined: Jun 2001
Posts: 11,645
Ken has posted the following question (which I'm reposting here to separate it from a patch notice which I don't think it relates to):

Quote

This is a simple question. I have put 5.0(985) out on some systems. I use to do compil/a/m/x:2 this was my standard. Now this complains about a lot of things. If I leave off the x:2 it is fine.
Before I change my DO files to remove the X:2, which is no problem, I just want to make sure this is a permenant thing.
I must confess that I have no idea what you're talking about. There has certainly been no explicit plan to remove support for the compil /x:2 switch. In fact, we use that for virtually everything in the SOSLIB, as well as all of the LITs. And although there were a couple of compiler patches between 984 and 985, I don't think there has been any change to the command line processing of COMPIL.LIT for a long time.
Furthermore, removing /x:2 from your command line is going to remove support for all of the A-Shell extensions (functions, procedures, switch, dimx, etc), although many are available with /rc switch also.

Can you give me an explicit example of a command line syntax that fails, so we can get to the bottom of this?

Re: compil/x:2 broken? #29758 04 Apr 07 10:16 AM
A
Anonymous
Unregistered
Anonymous
Unregistered
A
Morning Jack,

Finally found some time to look at this, I have updated some old users to 5.0. Then tried to compile some older programs. I am hitting some variables that start with FN'. Kinda catch 22 got some programs that use new stuff that need x:2 but the rest of the program is older using certain reseved variables. I will work through it. This specific program did not need to use x:2.

Thanks
Ken

Re: compil/x:2 broken? #29759 04 Apr 07 01:48 PM
Joined: Jun 2001
Posts: 11,645
J
Jack McGregor Online Content OP
Member
OP Online Content
Member
J
Joined: Jun 2001
Posts: 11,645
That makes sense, and is somewhat unavoidable. As you figured out, if you don't need /X:2 and it is causing problems, then don't use it. You might also be able to use /RC to get some of the features without causing an issue with FN' (since functions are not supported by /RC).

Although no one seems to have a good global replace for this kind of thing, The Editor does a very good job of locating all of them, and you could do some kind of file-by-file global replace of FN' to FN_ or FM' or ...? (Make sure you first do a global search for the pattern you are thinking of converting them to!)

Re: compil/x:2 broken? #29760 04 Apr 07 04:18 PM
Joined: Jun 2001
Posts: 11,645
J
Jack McGregor Online Content OP
Member
OP Online Content
Member
J
Joined: Jun 2001
Posts: 11,645
On the subject of efficiently converting reserved words in hundreds of existing programs to alternatives that don't conflict with the /X:2 new reserved words, Steven Shatz has contributed a utility he wrote which you may find very helpful. It requires modification and recompilation to adjust to your circumstances, but the notes at the top of the source are fairly clear and most importantly it saves the originals so if you don't like the results, you can fix and try again. Here's the link:
PRGCNV.BP

If anyone decides to make some improvements to it that they would like to share, please email me a copy and I'll post it (or probably just add it to the SOSLIB in the next update of it).

Re: compil/x:2 broken? #29761 05 Apr 07 11:16 AM
Joined: Jun 2001
Posts: 11,645
J
Jack McGregor Online Content OP
Member
OP Online Content
Member
J
Joined: Jun 2001
Posts: 11,645
I'm moving this subject (once again) to the Program Development forum under a more descriptive title (Upgrading to compil/x:2) in order to make it easier to refer to and discuss the issues surrounding migration to compil /x:2, which isn't strictly related to A-Shell 5.0.


Moderated by  Jack McGregor, Ty Griffin 

Powered by UBB.threads™ PHP Forum Software 7.7.3