Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
  • FPC Source FPC Source
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 1,260
    • Issues 1,260
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 46
    • Merge requests 46
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • FPC
  • FPC
  • FPC SourceFPC Source
  • Issues
  • #34953
Closed
Open
Created Jan 26, 2019 by FPC Admin account@fpc_adminOwner

compiler intrinsic all() returns the set consisting of all members of a given type

Original Reporter info from Mantis: kays @KaiBurghardt
  • Reporter name: Kai Burghardt

Description:

all(someOrdinalType) shall result/expand to [low(someOrdinalType)..high(someOrdinalType)], if someOrdinalType is continuous and within the ranges of our currently available set data types

Additional information:

Wirth originally proposed this syntax http://www.pascal-central.com/docs/pascal1973.pdf (PDF page 43, bottom). I can't find anything alike in the more recent ISO standards, that would virtually supersede that suggestion.

While all(boolean) or all(byte) are quite uninteresting, I think this feature is really cool in conjunction with enumerated types, or small enough number ranges.

I guess it is easy to implement, since the syntax [low(T)..high(T)] already exists and works without further ado. However, if an an enumerated type has been defined with explicit indices, that are not subsequent, it will return a different result than intended by all(myEnumeration).

Mantis conversion info:

  • Mantis ID: 34953
  • OS: GNU/Linux
  • OS Build: 4.2.0
  • Build: 3.0.4+dfsg-11 [2017/12/30]
  • Platform: x86_64
  • Version: 3.0.4
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking