withall: A Shorthand for Nested for Loop + If Statement

Conference paper
Part of the Lecture Notes on Data Engineering and Communications Technologies book series (LNDECT, volume 46)


The combination of for loop and if statement is very common in array programming. The for loop iterates over the elements in the array, the if statement filters out the required elements and are processed. A shorthand for this combination is developed from the observation that the information required for the loop indexing is often available in the processing statement. We also present a fast and efficient implementation of the loop for Single Dimensional arrays, with a minute increase in time for compilation.


Array processing For loop If statement Programming language construct 



The authors express their gratitude to all members of the Chapel development team, especially to Brad Chamberlain and Michael Ferguson for lending a helping hand during the times of dilemma. The time and effort they have spent to prepare lengthy reply mails in the layman’s language deserves thanks beyond words.


  1. 1.
  2. 2.
  3. 3.
    Arrays—Chapel Documentation 1.20.
  4. 4.
  5. 5.
    Grelck, C.: Shared memory multiprocessor support for functional array processing in SAC. J. Funct. Program. 15(3), 353–401 (2005)CrossRefGoogle Scholar
  6. 6.
    Data Structures—Python 3.7.5rc1 documentation.
  7. 7.
  8. 8.
    Chapel: Productive Parallel Programming.
  9. 9.
    Modules—Chapel Documentation 1.20.
  10. 10.
    Iterators—Chapel Documentation 1.20.
  11. 11.
  12. 12.
    GNU Time - GNU Project - Free Software Foundation.

Copyright information

© Springer Nature Switzerland AG 2020

Authors and Affiliations

  1. 1.Rajiv Gandhi Institute of TechnologyKottayamIndia
  2. 2.School of EngineeringCochin University of Science and TechnologyKochiIndia

Personalised recommendations