I beleive I have come accross a minor problem which may point my code or the GPC compiler itself. This code compiles and runs under my Borland Pascal 7.0 (Win), Borland Pascal 7.0 (Dos) and Turbo Pascal 7.1 (Dos) compilers.� The GPC compiler sees the assign syntax as an "undeclared identifier". I have included a 'Code Snippet' of my unimplemented but functional code and 'Compiler Error Message' (bellow) . Is there a patch for GPC or another way around this problem? � �
---------------------------------------------------------------------------------------------
Code Snippet ---------------------------------------------------------------------------------------------
{*----------------------------------------------------*} {*������ pTriplEx Vector Sequence Reomover����������� *} {*----------------------------------------------------*} {*�� By: Jim Pouliopoulos���������������������������� *} {*�� Written for the CSIRO Div. of Animal Production� *} {*�� , Australia������������������������������������� *} {*----------------------------------------------------*} {*� This program scans a *.seq.1 sequence file for��� *} {*� a sequnce match with the pTriplEx vector sequence *} {*� according to percent homology at both the 5' and� *} {*� 3' ends. It will then excise the vector from the� *} {*� sequence and rewrite the file�������������������� *} {*----------------------------------------------------*}
{* Implementation :������������������������������������������������������ } {���������������� - Reads File� to Array��������������������������������� } {���������������� - Writes Array� to disk (Formatted)�������������������� }
{* Not implemented:�������������������������������� } {����������������� - Homology Testing�������������� } {����������������� - Configuration File Input������ }
Program RemVec;
{Uses} ��� {CRT;}
Type ��� WrkArray = Array[ 1 .. 1000 ] of Char; ��� LetterRange = 'A'..'Z'; ��� BaseSet = SET OF LetterRange; ��� Vector_String = Packed Array[1..30] of Char;� {Array setup for Vector Sequence}
Var �� InChar������ : Char; �� InFile������ : Text; �� OutFile����� : Text; �� DatFile����� : Text; �� TempArray��� : WrkArray; �� i����������� : Integer; {counter} �� j����������� : Integer; {counter} �� Bases������� : BaseSet; �� LineCtr����� : Integer; {For Counting Chars on line for output} �� pXXX_Seq1��� : Vector_String;� {Sequence #1 for homology searching } �� pXXX_Seq2��� : Vector_String;� {Sequence #2 for homology searching } � �
Begin {main} ����� {ClrScr;} ����� Assign (InFile, 'temp.seq'); ����� Reset (InFile); ����� Assign (OutFile, 'temp.fix'); ����� Rewrite (OutFile); ����� Read (InFile, InChar); ����� Bases := ['A','G','C','T','N'];���������� { N = Wildcard } ����� {--------------------------------------------------------------------------}
����� {������������������� Read File Into the Array����������������������������� } ����� {--------------------------------------------------------------------------}
����� While NOT EOF (InFile) do ����������� Begin {while} ����������������� While (InChar <> Char (10)) and (InChar <> Char(26)) do ����������������������� Begin {while} ����������������������������� Write (InChar); ����������������������������� Inc (i); ����������������������������� TempArray[i] := InChar; ����������������������������� Read (InFile, InChar); ����������������������� End; {while} ����������������� Read (Infile, InChar); ����������� End; {while} ����� {---------------------------------------------------------------------------}
����� {���������������������� Read Data file into Array�������������������������� } ����� {---------------------------------------------------------------------------}
����� Assign (DatFile, 'g:\temp\test\14-01-98\seq\vector.dat'); ����� Reset (DatFile); ����� While NOT EOF (DatFile) do ����������� Begin {while} ����������������� Readln (DatFile); ����������������� Readln (DatFile); ����������������� Readln (DatFile);
����������� End; {while}
����� {---------------------------------------------------------------------------}
����� {�������������������� Match the Vector Sequences at the 5' end������������� } ����� {---------------------------------------------------------------------------}
�
����� {---------------------------------------------------------------------------}
����� {��������������� Writes Array To Disk with formatted output���������������� } ����� {---------------------------------------------------------------------------}
����� i := 1; ����� LineCtr := 1; ����� While TempArray[i] IN Bases do ����������� Begin {While} ����������������� Write (OutFile, TempArray[i]); ����������������� inc(i); ����������������� inc(LineCtr); ����������������� If LineCtr = 62 then �������������������� Begin {if} �������������������������� Writeln(OutFile); �������������������������� LineCtr := 1; �������������������� End; {if} ����������� End; {While} ����� Write (OutFile, TempArray[i]); ����� Writeln; ����� Close (InFile); ����� Close (OutFile); End. {main}
---------------------------------------------------------------------------------------------
Compiler Output ----------------------------------------------------------------------------------------------
nugget{jimp}52: gpc -v -o remvec06 remvec06.p --borland-pascal Reading specs from /usr/local/lib/gcc-lib/sparc-sun-sunos4.1/2.7.2.1/specs gpc version 2.0(2.7.2.1) �/usr/local/lib/gcc-lib/sparc-sun-sunos4.1/2.7.2.1/gpc-cpp -lang-pascal -v -noci GNU CPP version 2.0(2.7.2.1) (sparc) #include "..." search starts here: #include <...> search starts here: �/usr/local/include �/usr/local/sparc-sun-sunos4.1/include �/usr/local/lib/gcc-lib/sparc-sun-sunos4.1/2.7.2.1/include �/usr/include End of search list. �/usr/local/lib/gcc-lib/sparc-sun-sunos4.1/2.7.2.1/gpc1 /usr/tmp/cc026176.i -qus GNU Pascal version 2.0(2.7.2.1) (sparc) compiled by GNU C version 2.7.2.1. remvec06.p: In function `program_Remvec': remvec06.p:46: undeclared identifier `Assign' (first use this function) remvec06.p:46: (Each undeclared identifier is reported only once remvec06.p:46: for each function it appears in.) -------------------------------------------------------------------------------------------
pTriplEx Partial Seqence Data File
SEQUENCES TO SEARCH: 1. GAATTC 1 - 100 2. GAAATTC 1 - 100 3. 4. 5. 6.
{*----------------------------------------------------*} {* pTriplEx Vector Sequence Reomover *} {*----------------------------------------------------*} {* By: Jim Pouliopoulos *} {* Written for the CSIRO Div. of Animal Production *} {* , Australia *} {*----------------------------------------------------*} {* This program scans a *.seq.1 sequence file for *} {* a sequnce match with the pTriplEx vector sequence *} {* according to percent homology at both the 5' and *} {* 3' ends. It will then excise the vector from the *} {* sequence and rewrite the file *} {*----------------------------------------------------*}
{* Implementation : } { - Reads File to Array } { - Writes Array to disk (Formatted) } Program RemVec;
{Uses} {CRT;}
Type WrkArray = Array[ 1 .. 1000 ] of Char; LetterRange = 'A'..'Z'; BaseSet = SET OF LetterRange; Vector_String = Packed Array[1..30] of Char; {Array setup for Vector Sequence}
Var InChar : Char; InFile : Text; OutFile : Text; DatFile : Text; TempArray : WrkArray; i : Integer; {counter} j : Integer; {counter} Bases : BaseSet; LineCtr : Integer; {For Counting Chars on line for output} pXXX_Seq1 : Vector_String; {Sequence #1 for homology searching } pXXX_Seq2 : Vector_String; {Sequence #2 for homology searching }
Begin {main} {ClrScr;} Assign (InFile, 'temp.seq'); Reset (InFile); Assign (OutFile, 'temp.fix'); Rewrite (OutFile); Read (InFile, InChar); Bases := ['A','G','C','T','N']; { N = Wildcard } {--------------------------------------------------------------------------} { Read File Into the Array } {--------------------------------------------------------------------------} While NOT EOF (InFile) do Begin {while} While (InChar <> Char (10)) and (InChar <> Char(26)) do Begin {while} Write (InChar); Inc (i); TempArray[i] := InChar; Read (InFile, InChar); End; {while} Read (Infile, InChar); End; {while} {---------------------------------------------------------------------------} { Read Data file into Array } {---------------------------------------------------------------------------} Assign (DatFile, 'g:\temp\test\14-01-98\seq\vector.dat'); Reset (DatFile); While NOT EOF (DatFile) do Begin {while} Readln (DatFile); Readln (DatFile); Readln (DatFile);
End; {while}
{---------------------------------------------------------------------------} { Match the Vector Sequences at the 5' end } {---------------------------------------------------------------------------}
{---------------------------------------------------------------------------} { Writes Array To Disk with formatted output } {---------------------------------------------------------------------------} i := 1; LineCtr := 1; While TempArray[i] IN Bases do Begin {While} Write (OutFile, TempArray[i]); inc(i); inc(LineCtr); If LineCtr = 62 then Begin {if} Writeln(OutFile); LineCtr := 1; End; {if} End; {While} Write (OutFile, TempArray[i]); Writeln; Close (InFile); Close (OutFile); End. {main}