The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

557313 (12) [Avatar] Offline
#1
Hi Milan,

Thank you for explaining coarray syntax in Chapter 5.

In Listing 5.14 it looks like the starting array index "ims" will be zero for the left halo value. I believe that is the intent, so that the other array indices are not affected. Just after Listing 5.6 you mentioned that Fortran arrays start at index 1 (talking about the image index for coarrays). I feel it would be helpful to mention somewhere, maybe a sidebar, that Fortran arrays can be declared to start at any convenient index, but 1 is the default. That may help later in the chapter when talking about the halo values, and the left halo value is at index 0 for convenience to keep the other indices in the array the same. Would extra information about Fortran array index values help clarify the image index and halo value index?

I'm looking forward to future chapters.

Regards, Greg
Milan Curcic (43) [Avatar] Offline
#2
Hi Greg,

Yes, I think that's a good suggestion. There's a slight disconnect right now because I leapfrogged to Ch5 before writing Ch4. We'll cover arrays and indexing in-depth in Ch4 and that will also address this issue of starting array indices. Ch4 comes in the next MEAP update.

Thank you for all your input. I am curious what you think about the level of math used in the book -- see https://forums.manning.com/posts/list/43497.page .

Cheers,
milan
557313 (12) [Avatar] Offline
#3
Hi Milan,
You're right; I forgot that Ch. 4 on arrays is still to come.
I'll check that other thread about the math.
Regards, Greg
575626 (1) [Avatar] Offline
#4
Hi Milan

I would like to add to Greg's comments about arrays starting with an index of 1. In the table in Section 1.4 comparing Fortran and Python features you state that Fortran arrays start with an index of 1. Like Greg, I think this should be expanded to explain that this is the default, and it a feature of Fortran is that you can specify an arbitrary range for the index. For example I regularly use an array with indexes "-n:n" to store pdf/histogram data. This produces particularly readable/compact code when counting negative values, or values not starting with 0 or 1.

Kind regards

John
Milan Curcic (43) [Avatar] Offline
#5
Thanks, John! I will make sure to explain this clearly in the next release.

Cheers!
milan