Author Topic: trying to process --options with checkOptions works only if --option=value, and  (Read 128 times)


  • New Member
  • *
  • Posts: 16
Using lazarus 2.0.6 i am trying to build a multi-language application. That works now. i now need to determine if the language option --lang was mentioned on the command line.

when i start the program with appname --lang=de it passes the check checkOptions('l:', 'lang:')

when i start the program with appname --lang de it fails the check checkOptions('l:', 'lang:') with error ""Option at position 1 needs an argument :"

the option --lang de DOES bring up the correct language, same as --lang=de. This was a fix for 2.0.6.

how can i extract the command line option value after --lang using getOptionValue or something similar when the option is given as --lang de?
lubuntu 20.04, Lazarus trunk, FPC 3.0.4
Raspbian Buster, Lazarus trunk, FPC 3.0.4


TinyPortal © 2005-2018