Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • dynare dynare
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 108
    • Issues 108
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 7
    • Merge requests 7
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Dynare
  • dynaredynare
  • Issues
  • #1547
Closed
Open
Created Nov 07, 2017 by Tom Holden@tholden

allow length operator in macroprocessor to return the length of strings

At present, the length operator applied to a string always returns 1.

It would be good if it returned the length of the string.

Try e.g.:

@#define Numbers = [ "1", "2", "3", "4", "5", "6" ]
@#define TestString = "Hello"
@#echo Numbers[ length( TestString ) ]

parameters a;
a = 1;

Incidentally, it would be good if there was a number to string function in the pre-processor!

Assignee
Assign to
Time tracking