program demo;

{$mode objfpc}{$h+}
{$ifdef mswindows}{$apptype console}{$endif}

uses
{$ifdef unix}
  cthreads,
  cwstring,
{$endif}
  msetypes, { msestringarty }{ https://msegui.net/doc/fpdoc/msetypes/msestringarty.html }
  msesys, { getcommandlinearguments }
  msestrings, { msestrlicomp }
  sysutils;

const
  coptionname = '--OPTION1=';
 
var
  larguments: msestringarty;
  i: integer;
  
begin
  larguments := getcommandlinearguments;
  for i := 1 to high(larguments) do
  begin
    if msestrlicomp(pmsechar(larguments[i]), pmsechar(coptionname), length(coptionname)) = 0 then
    begin
      writeln(copy(larguments[i], length(coptionname) + 1, msetypes.bigint));
    end;
  end;
end.
