Skip to content
GitLab
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
    Projects Groups Snippets
  • Sign up now
  • Login
  • Sign in / Register
  • FPC Source FPC Source
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Graph
    • Compare
    • Locked Files
  • Issues 1,354
    • Issues 1,354
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 72
    • Merge requests 72
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • FPC
  • FPCFPC
  • FPC SourceFPC Source
  • Issues
  • #37547
Closed
Open
Issue created Aug 11, 2020 by FPC Admin account@fpc_adminOwner

high() and low() accept expressions

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

Description:

high() and low() accept expressions, but should only accept ordinal and set data types, or array and set variables

Steps to reproduce:

program dependentRangeDefinition(input, output, stdErr);
type
	foo = 0..7;
	// Note, this was an accidental programming error of mine:
	bar = 0..high(foo * 6);
begin
	writeLn(high(bar));
end.

Additional information:

The maximum value an expression may assume is usually of minor interest, since we already know it is the processor’s native type.

Mantis conversion info:

  • Mantis ID: 37547
  • 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