Hi Eckhard,


See my comments below.



Regards,



Arjen

> -----Original Message-----
> From: Eckhard Krotscheck [mailto:eckha...@buffalo.edu]
> Sent: Wednesday, December 27, 2017 2:07 AM
> To: plplot-general@lists.sourceforge.net
> Subject: [Plplot-general] plscmap1l -- gfortran
>
> Hi All
>
> .. I am new to this list. Trying to migrate from pgplot to plplot
>
> I have a problem with plscmap1l . The documentation gives on page 140 the call
>
> plscmap1l ( itype , npts , intensity , coord1 , coord2 , coord3 , 
> alt_hue_path );
>
> however if I I enter the entry npts I get an error message.
>
> For example, the example x20f.f90
> contains the call
>
> call plscmap1l(.true., pos, r, g, b, rev)
>
> if I change this to
>
> call plscmap1l(.true., 2, pos, r, g, b, rev)
>
>
>
>
> for 2 sample points I get the error message
>
> x20f.f90:613:50:
>
>         call plscmap1l(.true., 2, pos, r, g, b, rev)
>                                                    1
> Error: There is no specific subroutine for the generic 'plscmap1l' at (1)
>
>>AM: The reason for this is that the Fortran API uses the so-called redacted 
>>form of the argument list. It uses the fact that Fortran, as of the Fortan 90 
>>standard, can pass array descriptors rather than simple starting addresses. 
>>This means that it is not necessary to add the size of the arrays explicitly. 
>>If you need to pass a portion of an array you can do so by passing an array 
>>section.

To illustrate:

call plscmap1l(.true., pos(1:2), r(1:2), g(1:2), b(1:2), rev(1:1))

would have the required effect. In general, however, we seldom need to pass so 
many array sections.

C lacks this ability, so the C API explicitly requires passing the array sizes.

In general using the redacted form prevents a lot of mistakes - just consider 
typing in the wrong size:

real, dimension(10) :: x, y

npts = 100

call plpoin( npts, x, y, 9 )





DISCLAIMER: This message is intended exclusively for the addressee(s) and may 
contain confidential and privileged information. If you are not the intended 
recipient please notify the sender immediately and destroy this message. 
Unauthorized use, disclosure or copying of this message is strictly prohibited. 
The foundation 'Stichting Deltares', which has its seat at Delft, The 
Netherlands, Commercial Registration Number 41146461, is not liable in any way 
whatsoever for consequences and/or damages resulting from the improper, 
incomplete and untimely dispatch, receipt and/or content of this e-mail.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Plplot-general mailing list
Plplot-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-general

Reply via email to