Paul Isaacs | 31 Mar 07:20 2016

binding to non-existent file

Hello,

I am following the example from page 94 of the GNU pascal manual.

bind( f,b);
b := binding( f );

b.bound appears to be true even though the file does not exist although 
the example indicates otherwise.

I have duplicated the example - it finds a non-existent file.

Is the example wrong ( the same example is in the standard )?

Regards,

Paul Isaacs

_______________________________________________
Gpc mailing list
Gpc <at> gnu.de
https://www.g-n-u.de/mailman/listinfo/gpc
Prof Abimbola Olowofoyeku | 29 Mar 12:49 2016

Re: Problems when compiling "crtdemo.pas"

On 29 Mar 2016 at 12:37, mathias uhle wrote:

> Hello Chief,
> 
> thank you for that offer. I will prepare a tar-file with the details in
> an hour or so and mail it to you.
[...]
Please post your error log to the GPC list.

Also, you might first want to try compiling the program using 
"--autobuild"

Best regards, The Chief
--------
Prof. Abimbola A. Olowofoyeku (The African Chief) 
web:  http://www.greatchief.plus.com/

_______________________________________________
Gpc mailing list
Gpc <at> gnu.de
https://www.g-n-u.de/mailman/listinfo/gpc
mathias uhle | 29 Mar 10:54 2016
Picon

Problems when compiling "crtdemo.pas"

Hello out there

trying to compile the example-program "crtdemo.pas" produces an awful lot of 
errors for me. My problem is: I am by no means accustomed to "c".
The purpose of my attempt is to transfer a very old program from Novell-Dos to 
SuSE 13.2 The program heavily relies on what is now ncurses. But even that is 
new to me.

I just tried:  gpc --automake -ocrt crtdemo.pas
The running  64-Bit version of the GPC-compiler and the "crtdemo.pas" are 
from:
"https://openSUSE Build Service > Projects > home:TrevorBl > gpc > Binaries > 
gpc-20070904-185.1.x86_64.rpm" 
This rpm installed properly and works fine with a wealth of my programs 
running on an old Athlon 64 3200+ Mem: 3G

Any help possible?

Mathias Uhle

--

-- 
mathias.uhle <at> tu-dortmund.de

_______________________________________________
Gpc mailing list
Gpc <at> gnu.de
https://www.g-n-u.de/mailman/listinfo/gpc
Waldek Hebisch | 29 Mar 04:22 2016
Picon

Re: function-identifier-variable

Paul Isaacs wrote:
> 
> As it is I was thinking function-access would be accessing a function, 
> not a return value.
> Component-function-access with array and records was providing clues but 
> I just couldn't figure out the meaning.
> 
> Am I correct in now thinking that 10206 will not provide any way to get 
> the address of a function the way that the  <at>  extension does in gnu 
> pascal without the --extended-pascal restriction?

In ISO Pascal you have variable parameters and procedural parameters.
They allow you to do most things possible with address operator,
but not all and in a different way.

> I am chugging away writing a 10206 compliant compiler using GNU pascal 
> and suddenly thought that using extensions to enable the writing of a 
> compliant compiler was not a great way to advertise 10206. I recognize 
> that the extensions are there because they are useful - but - do they 
> also flag 10206 as a poor standard to use?

Well, 10206 was deliberately limited.  Practically, decent compiler
should allow writing runtime library.  But ISO 10206 misses
extentions needed for writing functions like 'new'.  This
does not mean that this is poor standard, just that for
some purposes you may need extentions.

> I am hesitating to use extensions because the target of the compiler 
> will be embedded processors.They are problematic to debug so you want to 
> have the compiler produce code that is as bug free as possible. I though 
(Continue reading)

Waldek Hebisch | 29 Mar 01:19 2016
Picon

Re: function-identifier-variable

Paul Isaacs wrote:
> 
> 
> Waldek, Professor,
> 
> Thank you for the replies.
> 
> "A pointer-function shall be a function-access possessing : a pointer-type."
> 
> Howvever,  I can't see how to generate a function-access possessing a 
> pointer-type:

Just declare apropriate return type.  Useful example would
be complicated, but a useless one is:

program pb;
type pb = ^boolean;
var pv : pb;

function y : pb;
begin
    y := pv
end;

{Main program}
begin
    new(pv);
    pv^ := true;
    {Use y}
    if y^ then writeln("OK")
(Continue reading)

Paul Isaacs | 28 Mar 21:00 2016

function-identifier-variable

Hello;

program test;

{
     productions:

     assignment-statement                    :  contains expression
     expression                                        :  contains 
simple-expression
     simple-expression                            :  eventually works 
down to primary
     primary                                               : contains 
variable-access
     variable-access                                :  contains 
function-identifier-variable
     function-identifier-variable               =  pointer-function '^'
     pointer-function                                 :   contains 
entire-function-access
     entire-function-access                     = function-designator
     function-designator                          =  function-name [ 
actual-parameter-list ]
     function-name                                    :  contains identifier
}

{
  compiled with:

$PASCAL/local/bin/gpc --extended-pascal test.pas
test.pas: In main program:
(Continue reading)

Paul Isaacs | 20 Mar 04:01 2016

compiling gcc-3.4.4

Hello,

For what its worth:

To overcome an error compiling unwind-dw2,

Instances of "struct siginfo" have to be changed to "siginfo_t" in 
gcc-3.4.4/gcc/config/i386/linux.h

Regards,

Paul Isaacs

_______________________________________________
Gpc mailing list
Gpc <at> gnu.de
https://www.g-n-u.de/mailman/listinfo/gpc
Paul Isaacs | 20 Mar 00:48 2016

Compiling

Hello,

running:  3.16.0-4-686-pae GNU/Linux

Trying to compile:

downloaded gpc-20060325
                        gcc-3.4.4

did:

------------ Solved:

Not finding includes in /usr/include/i386-linux-gnu

Regards,

Paul Isaacs

_______________________________________________
Gpc mailing list
Gpc <at> gnu.de
https://www.g-n-u.de/mailman/listinfo/gpc
Paul Isaacs | 19 Mar 06:33 2016

Compiling

Hello,

running:  3.16.0-4-686-pae GNU/Linux

Trying to compile:

downloaded gpc-20060325
                       gcc-3.4.4

did:

moved p dir to gcc-3.4.4/gcc

cd gcc-3.4.4 ( did not use build directory to keep things simple )

./configure --prefix=/home/Downloads --enable-languages=pascal

make

got : after responding to patch request

checking how to run the C preprocessor... /lib/cpp
checking for inline... inline
checking for long long int... yes
checking for __int64... no
checking for built-in _Bool... yes
checking size of void *... configure: error: cannot determine a size for 
void *
Makefile:23329: recipe for target 'configure-gcc' failed
make: *** [configure-gcc] Error 1
(Continue reading)

Paul Isaacs | 15 Mar 21:51 2016

gp file not found

Hello,

I have installed gp using:

make prefix=$PASCAL/local CFLAGS=-I/usr/include/i386-linux-gnu install
and adding $PASCAL/local/bin to PATH

gp  --version reports "GP version  0.61"

However gp x.pas results in "x.pas: file not found"

At line 2643 in gp.pas the error message literal is "file not found". 
The ":" after the file name is must be from MainSrcBase

If I place two source files on the command line the expected error occurs.

I am using Q4OS  linux and the source file is present when I do an "ls".

What am I doing wrong?

Thanks,

Paul Isaacs

_______________________________________________
Gpc mailing list
Gpc <at> gnu.de
https://www.g-n-u.de/mailman/listinfo/gpc
Paul Isaacs | 15 Mar 03:53 2016

Variable length argument types for libusb binding

Hello,

I have written a gnu pascal binding for libusb.

I would like to improve it by using schemata for the various variable 
length libusb function arguments.

I can come close by generating the USB arg pointer dynamically as follows:

UsbArgPtr := UsbPtr(  addr(  ArraySchemata[ 1 ]  )  ) to generate a 
pointer to the array within the schemata. This process can be hidden 
within the thick binding but not the thin binding.

I would like to be able to declare a type that points to this address 
for use as an argument type in the binding functions.

Is this possible? Do schemata have other attributes as well as .Size 
that could be used?

Thanks,

Paul Isaacs

_______________________________________________
Gpc mailing list
Gpc <at> gnu.de
https://www.g-n-u.de/mailman/listinfo/gpc

Gmane