forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Search found 2447 matches
forums.silverfrost.com Forum Index
Author Message
  Topic: Tab separated fields
JohnCampbell

Replies: 15
Views: 314

PostForum: General   Posted: Thu Feb 02, 2023 3:23 am   Subject:
Field delimiters have long been a problem for portability in Fortran. The 3 most common (from my usage) are :
* comma ","
* (horizontal) TAB
* semicolon ";"

comma is by fa ...
  Topic: Formatted read with A format converts tabs to spaces
JohnCampbell

Replies: 4
Views: 186

PostForum: Support   Posted: Sun Jan 29, 2023 11:58 am   Subject:
Fortran is very poor at handling delimiter characters.
FTN95 is good at handling comma delimiters for numeric data (by terminating the field length) but it's handling of tabs can insert between 0 to ...
  Topic: Tab separated fields
JohnCampbell

Replies: 15
Views: 314

PostForum: General   Posted: Sun Jan 29, 2023 7:42 am   Subject:
The following code copes with either horizontal tabs (char(9)) are present or they have been replaced by at least 3 spaces.
In FTN95, "call READ_TABS@ (8)" will stop tabs being replaced by ...
  Topic: Formatted read with A format converts tabs to spaces
JohnCampbell

Replies: 4
Views: 186

PostForum: Support   Posted: Sun Jan 29, 2023 6:08 am   Subject:
I don't think this is a bug, but a documented "Feature" !

In FTN95.chm > Fortran Input and Output > OPEN ; this describes what is happening.

Reading tab characters
In a Fortran ...
  Topic: Reference through null fortran pointer
JohnCampbell

Replies: 6
Views: 281

PostForum: Support   Posted: Sat Jan 28, 2023 2:59 am   Subject:
My solution for the repeated mouse interupts has been to only update after a minimum movement distance.

Alternatively, you could have a status variable, say "magnify_in_progress" and eith ...
  Topic: Reference through null fortran pointer
JohnCampbell

Replies: 6
Views: 281

PostForum: Support   Posted: Fri Jan 27, 2023 12:07 am   Subject:
Dan,

You did not show how arrays MagnifierArr and ImageArr are defined.

My minimum requirement is as arguments would be:
integer MagnifierArr(3, ixsizMag,iysizMag), ImageArr(3,hres,vres)
This ...
  Topic: Reference through null fortran pointer
JohnCampbell

Replies: 6
Views: 281

PostForum: Support   Posted: Thu Jan 26, 2023 6:43 am   Subject:
Dan,

The following code could run faster and clarify some integer division.
Is magnFactor real ?

subroutine Magnifier ( ihw_Magnifier, magnFactor, ix_mouse, iy_mouse, &
...
  Topic: GET_GSTORAGE@ doesn't always work?
JohnCampbell

Replies: 52
Views: 1670

PostForum: Support   Posted: Wed Jan 18, 2023 5:11 am   Subject:
I may be saying what Robert said, but slightly differently, as for a 32 bit executable on Win 9 +, a valid memory address could be between 0 to about 3.7 GBytes.

There is potential for some of the ...
  Topic: GET_GSTORAGE@ doesn't always work?
JohnCampbell

Replies: 52
Views: 1670

PostForum: Support   Posted: Sat Jan 14, 2023 5:28 am   Subject:
Kenny,

I find the combination of Fortran local, automatic and ALLOCATE arrays work well for me for /64. I limit my memory management to call by reference arrays, so do not use pointers or memory ad ...
  Topic: GET_GSTORAGE@ doesn't always work?
JohnCampbell

Replies: 52
Views: 1670

PostForum: Support   Posted: Sat Jan 14, 2023 2:39 am   Subject:
This is my contribution to understanding memory allocation
module ELEM_DATA_BASE ! (minimal example)

integer*4 :: MXELEM = 0 ! maximum element number ...
  Topic: GET_GSTORAGE@ doesn't always work?
JohnCampbell

Replies: 52
Views: 1670

PostForum: Support   Posted: Fri Jan 13, 2023 12:58 pm   Subject: Re:
It is worth remembering that VirtualAlloc allocates (or uses memory) at page size granularity. So an alloc of a few bytes takes a full 4K page

Robert, Your earlier statement that you provided inte ...
  Topic: GET_GSTORAGE@ doesn't always work?
JohnCampbell

Replies: 52
Views: 1670

PostForum: Support   Posted: Tue Jan 10, 2023 12:30 pm   Subject: Re:
Kenny

Here is a sample but you will need a new clearwin64.dll because __open_heap and __close_heap are not currently exported.

I am interested in aligning ALLOCATE on a page boundary, so I am wo ...
  Topic: UNDEF causing allocation problems
JohnCampbell

Replies: 8
Views: 436

PostForum: Support   Posted: Wed Jan 04, 2023 6:11 am   Subject:
If running the above program with task manager, show both "Commit size" and "Working Set"
  Topic: UNDEF causing allocation problems
JohnCampbell

Replies: 8
Views: 436

PostForum: Support   Posted: Wed Jan 04, 2023 5:47 am   Subject:
Dan,

Without /UNDEF, this program will allocate successfully until the size of Arr4 exceeds your virtual memory size limit.
As you never access / "touch" Arr4, it will never be allocate ...
  Topic: Compiler flags only one incorrectly declared variable
JohnCampbell

Replies: 11
Views: 560

PostForum: Support   Posted: Thu Dec 29, 2022 2:26 am   Subject:
This looks to be a good approach.

I also use ftn95.cfg to include:
/SET_ERROR_LEVEL Warning 327
( I assume there can be multiple of these instructions in ftn95.cfg or multiple error numbers liste ...
 
Page 1 of 164 Goto page 1, 2, 3 ... 162, 163, 164  Next
All times are GMT + 1 Hour
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group