{"id":1183,"date":"2022-04-01T11:19:15","date_gmt":"2022-04-01T14:19:15","guid":{"rendered":"https:\/\/gladiston.net.br\/?p=1183"},"modified":"2022-07-13T16:06:51","modified_gmt":"2022-07-13T19:06:51","slug":"como-lidar-com-parametros-de-entrada-em-seu-aplicativo","status":"publish","type":"post","link":"https:\/\/gladiston.net.br\/en\/como-lidar-com-parametros-de-entrada-em-seu-aplicativo\/","title":{"rendered":"How to handle input parameters in your application"},"content":{"rendered":"<p>You are writing a core application or a basic utility and you want it to take parameters like\u00a0<strong>myutility.exe verbose import=entry.log<\/strong>\u00a0<strong>export=output.csv<\/strong>\u00a0to indicate verbosity in the messages, also the file that will be read and finally, the file that will be generated after processing, but the question is: how to correctly detect them within the program? There are many different methods, I will demonstrate the way I use it over time which is simple and maintenance free. The example is for Delphi and Lazarus.<\/p>\n\n\n\n<p>Read more in the following article:<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-gladiston-santana wp-block-embed-gladiston-santana\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"KyhMKNIyca\"><a href=\"https:\/\/gladiston.net.br\/en\/programacao\/lazarus-ide\/lidando-com-parametros-de-entrada-em-seu-aplicativo\/\">Handling input parameters in your application<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"\u201cHandling Input Parameters in Your Application\u201d \u2014 Gladiston Santana\" src=\"https:\/\/gladiston.net.br\/programacao\/lazarus-ide\/lidando-com-parametros-de-entrada-em-seu-aplicativo\/embed\/#?secret=IagUZPqPnP#?secret=KyhMKNIyca\" data-secret=\"KyhMKNIyca\" width=\"580\" height=\"327\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>","protected":false},"excerpt":{"rendered":"<p>Voc\u00ea esta escrevendo um aplicativo principal ou um utilit\u00e1rio b\u00e1sico e deseja que ele receba par\u00e2metros como\u00a0meuutilitario.exe verbose import=entrada.log\u00a0export=saida.csv\u00a0para indicar verbosidade nas mensagens, tamb\u00e9m o arquivo que ser\u00e1 lido e por fim, o arquivo que ser\u00e1 gerado ap\u00f3s o processamento, mas a pergunta \u00e9: como detect\u00e1-los corretamente dentro do programa? H\u00e1 muitos m\u00e9todos diferentes, vou [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"templates\/template-full-width.php","format":"standard","meta":{"footnotes":""},"categories":[27,20],"tags":[],"class_list":["post-1183","post","type-post","status-publish","format-standard","hentry","category-delphi","category-freepascal"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/gladiston.net.br\/en\/wp-json\/wp\/v2\/posts\/1183","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gladiston.net.br\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gladiston.net.br\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gladiston.net.br\/en\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/gladiston.net.br\/en\/wp-json\/wp\/v2\/comments?post=1183"}],"version-history":[{"count":1,"href":"https:\/\/gladiston.net.br\/en\/wp-json\/wp\/v2\/posts\/1183\/revisions"}],"predecessor-version":[{"id":1184,"href":"https:\/\/gladiston.net.br\/en\/wp-json\/wp\/v2\/posts\/1183\/revisions\/1184"}],"wp:attachment":[{"href":"https:\/\/gladiston.net.br\/en\/wp-json\/wp\/v2\/media?parent=1183"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gladiston.net.br\/en\/wp-json\/wp\/v2\/categories?post=1183"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gladiston.net.br\/en\/wp-json\/wp\/v2\/tags?post=1183"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}