| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#41
| |||
| |||
| Richard Maine wrote: > Anyway, I took a quick look at the particular case you mentioned and I > verified that the braces are missing from that example. This seems very > likely to be a typesetting error. Note that braces need special > attention in LaTex (which is used fo rthe standard), which makes such an > error particularly plausuble. Those braces were in the f2003 standard. I used to have a TeX macro that would allow inclusion of text using a typewriter font and retaining blanks, line breaks, and including braces. It requires one character that isn't used in the included text to close the block. A non-printing control character can be used if needed. -- glen |
|
#42
| |||
| |||
| On Fri, 29 Aug 2008 11:55:02 -0600, "James Van Buskirk" <not_valid@comcast.net> wrote: > Possible implementation: > interface > subroutine qsort(BasePtr, NoOfElements, Width, cmp_func) bind(C) > use ISO_C_BINDING > ! import my_cmp_func ! doesn't work > type(C_PTR), value :: BasePtr > integer(C_SHORT), value :: NoOfElements > integer(C_SHORT), value :: Width Those two should be C_SIZE_T. There are many systems where these are different sizes, although probably fewer where it makes a difference to the (by-value) calling convention (and thus fails detectably). > interface > function cmp_func(elem1, elem2) bind(C) > use ISO_C_BINDING > integer(C_LONG) cmp_func Similarly C_INT; there are probably fewer (but still some) where these differ in size, and very few where it makes a difference. > type(C_PTR), value :: elem1 > type(C_PTR), value :: elem2 > end function cmp_func > end interface > ! procedure(my_cmp_func) cmp_func ! doesn't work > end subroutine qsort > end interface <snip rest> - formerly david.thompson1 || achar(64) || worldnet.att.net |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.