{"id":1354,"date":"2019-03-25T17:34:43","date_gmt":"2019-03-25T20:34:43","guid":{"rendered":"http:\/\/xexeu.elipse.com.br\/pt\/nocoes-de-vbscript-no-software-elipse-e3-licao-10-procedimentos-e-funcoes\/"},"modified":"2020-02-20T15:17:29","modified_gmt":"2020-02-20T18:17:29","slug":"nocoes-de-vbscript-no-software-elipse-e3-licao-10-procedimentos-e-funcoes","status":"publish","type":"post","link":"https:\/\/kb.elipse.com.br\/en\/nocoes-de-vbscript-no-software-elipse-e3-licao-10-procedimentos-e-funcoes\/","title":{"rendered":"No\u00e7\u00f5es de VBScript no Software Elipse E3: Li\u00e7\u00e3o 10 &#8211; Procedimentos e Fun\u00e7\u00f5es."},"content":{"rendered":"<p>Procedimentos s\u00e3o linhas de c\u00f3digo, usadas para responder a eventos ou executar algumas a\u00e7\u00f5es. Os procedimentos n\u00e3o retornam valores e s\u00e3o identificados pela palavra Sub na sua declara\u00e7\u00e3o. Todos os procedimentos devem come\u00e7ar com uma letra, e podem conter letras, n\u00fameros e o caractere underscore.<\/p>\n<p>Fun\u00e7\u00f5es s\u00e3o usadas quando se pretende executar c\u00e1lculos ou testar valores e retorna sempre algo. Um exemplo \u00e9 somar dois valores e retornar o valor da soma.<\/p>\n<p>Exemplo:<\/p>\n<pre><span style=\"font-family: Courier New; background-color: #cccccc;\">Sub CommandButton1_Click()<\/span><br style=\"font-family: Courier New; background-color: #cccccc;\" \/><span style=\"font-family: Courier New; background-color: #cccccc;\">\u00a0\u00a0\u00a0 'Function soma<\/span><br style=\"font-family: Courier New; background-color: #cccccc;\" \/><span style=\"font-family: Courier New; background-color: #cccccc;\">\u00a0\u00a0\u00a0 resposta = Soma(10,20)<\/span><br style=\"font-family: Courier New; background-color: #cccccc;\" \/><span style=\"font-family: Courier New; background-color: #cccccc;\">\u00a0\u00a0\u00a0 MsgBox resposta<\/span><br style=\"font-family: Courier New; background-color: #cccccc;\" \/><span style=\"font-family: Courier New; background-color: #cccccc;\">\u00a0\u00a0\u00a0 <\/span><br style=\"font-family: Courier New; background-color: #cccccc;\" \/><span style=\"font-family: Courier New; background-color: #cccccc;\">\u00a0\u00a0\u00a0 'Sub exibir mensagem<\/span><br style=\"font-family: Courier New; background-color: #cccccc;\" \/><span style=\"font-family: Courier New; background-color: #cccccc;\">\u00a0\u00a0\u00a0 ExibirMensagem(\"Mensagem a ser exibida\")\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 <\/span><br style=\"font-family: Courier New; background-color: #cccccc;\" \/><span style=\"font-family: Courier New; background-color: #cccccc;\">End Sub<\/span><br style=\"font-family: Courier New; background-color: #cccccc;\" \/><br style=\"font-family: Courier New; background-color: #cccccc;\" \/><span style=\"font-family: Courier New; background-color: #cccccc;\">Function Soma(a,b)<\/span><br style=\"font-family: Courier New; background-color: #cccccc;\" \/><span style=\"font-family: Courier New; background-color: #cccccc;\">\u00a0\u00a0\u00a0 Soma = a + b<\/span><br style=\"font-family: Courier New; background-color: #cccccc;\" \/><span style=\"font-family: Courier New; background-color: #cccccc;\">End Function<\/span><br style=\"font-family: Courier New; background-color: #cccccc;\" \/><span style=\"font-family: Courier New; background-color: #cccccc;\">\u00a0\u00a0\u00a0 <\/span><br style=\"font-family: Courier New; background-color: #cccccc;\" \/><span style=\"font-family: Courier New; background-color: #cccccc;\">Sub ExibirMensagem(mensagem)\u00a0\u00a0\u00a0 <\/span><br style=\"font-family: Courier New; background-color: #cccccc;\" \/><span style=\"font-family: Courier New; background-color: #cccccc;\">\u00a0\u00a0\u00a0 MsgBox mensagem<\/span><br style=\"font-family: Courier New; background-color: #cccccc;\" \/><span style=\"font-family: Courier New; background-color: #cccccc;\">End Sub<\/span><\/pre>\n<p><span style=\"color: #3366ff; font-weight: bold; font-style: italic; font-size: large;\">Exerc\u00edcios:<\/span><\/p>\n<p>1. Crie um bot\u00e3o que contenha uma Function que some, multiplique e divida dois n\u00fameros e exiba cada resposta em uma caixa de mensagem.<br \/>\n2. Crie a seguinte estrutura de alarmes:<\/p>\n<div style=\"text-align: center;\"><img loading=\"lazy\" title=\"\" src=\"http:\/\/kb.elipse.com.br\/pt-br\/images\/ID2104\/fig_017.bmp\" alt=\"\" width=\"203\" height=\"185\" align=\"bottom\" border=\"0\" \/><br \/>\n<span style=\"font-size: xx-small;\">Figura 17<\/span><\/div>\n<p>3. Associe cada alarme digital a um tag interno. Para alterar o valor do tag interno, utilize na tela o ToggleButton.<br \/>\n4. Crie um bot\u00e3o que exiba uma caixa de mensagem para todos os objetos de alarmes. A mensagem deve informar se \u00e9 uma \u00e1rea ou alarme digital e o nome do objeto. Dica: para cada objeto, verifique o TypeName. Crie uma Sub para objetos do tipo \u00e1rea e outra sub para objetos do tipo fonte.<\/p>\n<h3>Anexos:<\/h3>\n<p><a href=\"\/wp-content\/uploads\/2019\/03\/Licao10.zip\">Licao10.zip<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Procedimentos s\u00e3o linhas de c\u00f3digo, usadas para responder a eventos ou executar algumas a\u00e7\u00f5es. Os procedimentos n\u00e3o retornam valores e s\u00e3o identificados&#8230;<br \/>\nAutor<br \/>\nPaula Pereira En\u00e9as<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0},"categories":[578,610],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v19.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>No\u00e7\u00f5es de VBScript no Software Elipse E3: Li\u00e7\u00e3o 10 - Procedimentos e Fun\u00e7\u00f5es.[:] - Elipse Knowledgebase<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/kb.elipse.com.br\/nocoes-de-vbscript-no-software-elipse-e3-licao-10-procedimentos-e-funcoes\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"No\u00e7\u00f5es de VBScript no Software Elipse E3: Li\u00e7\u00e3o 10 - Procedimentos e Fun\u00e7\u00f5es.\" \/>\n<meta property=\"og:description\" content=\"Procedimentos s\u00e3o linhas de c\u00f3digo, usadas para responder a eventos ou executar algumas a\u00e7\u00f5es. Os procedimentos n\u00e3o retornam valores e s\u00e3o identificados... Autor Paula Pereira En\u00e9as\" \/>\n<meta property=\"og:url\" content=\"https:\/\/kb.elipse.com.br\/nocoes-de-vbscript-no-software-elipse-e3-licao-10-procedimentos-e-funcoes\/\" \/>\n<meta property=\"og:site_name\" content=\"Elipse Knowledgebase\" \/>\n<meta property=\"article:publisher\" content=\"http:\/\/www.facebook.com\/elipsesoftware\" \/>\n<meta property=\"article:published_time\" content=\"2019-03-25T20:34:43+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-02-20T18:17:29+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/kb.elipse.com.br\/pt-br\/images\/ID2104\/fig_017.bmp\" \/>\n<meta name=\"author\" content=\"Elipse Software\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Elipse Software\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/kb.elipse.com.br\/nocoes-de-vbscript-no-software-elipse-e3-licao-10-procedimentos-e-funcoes\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/kb.elipse.com.br\/nocoes-de-vbscript-no-software-elipse-e3-licao-10-procedimentos-e-funcoes\/\"},\"author\":{\"name\":\"Elipse Software\",\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/person\/def69ea453ea60b250497b89225a9f87\"},\"headline\":\"No\u00e7\u00f5es de VBScript no Software Elipse E3: Li\u00e7\u00e3o 10 &#8211; Procedimentos e Fun\u00e7\u00f5es.\",\"datePublished\":\"2019-03-25T20:34:43+00:00\",\"dateModified\":\"2020-02-20T18:17:29+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/kb.elipse.com.br\/nocoes-de-vbscript-no-software-elipse-e3-licao-10-procedimentos-e-funcoes\/\"},\"wordCount\":211,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/kb.elipse.com.br\/#organization\"},\"articleSection\":[\"Elipse E3\",\"Scripts\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/kb.elipse.com.br\/nocoes-de-vbscript-no-software-elipse-e3-licao-10-procedimentos-e-funcoes\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/kb.elipse.com.br\/nocoes-de-vbscript-no-software-elipse-e3-licao-10-procedimentos-e-funcoes\/\",\"url\":\"https:\/\/kb.elipse.com.br\/nocoes-de-vbscript-no-software-elipse-e3-licao-10-procedimentos-e-funcoes\/\",\"name\":\"[:pt]No\u00e7\u00f5es de VBScript no Software Elipse E3: Li\u00e7\u00e3o 10 - Procedimentos e Fun\u00e7\u00f5es.[:] - Elipse Knowledgebase\",\"isPartOf\":{\"@id\":\"https:\/\/kb.elipse.com.br\/#website\"},\"datePublished\":\"2019-03-25T20:34:43+00:00\",\"dateModified\":\"2020-02-20T18:17:29+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/kb.elipse.com.br\/nocoes-de-vbscript-no-software-elipse-e3-licao-10-procedimentos-e-funcoes\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/kb.elipse.com.br\/nocoes-de-vbscript-no-software-elipse-e3-licao-10-procedimentos-e-funcoes\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/kb.elipse.com.br\/nocoes-de-vbscript-no-software-elipse-e3-licao-10-procedimentos-e-funcoes\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"In\u00edcio\",\"item\":\"https:\/\/kb.elipse.com.br\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"No\u00e7\u00f5es de VBScript no Software Elipse E3: Li\u00e7\u00e3o 10 &#8211; Procedimentos e Fun\u00e7\u00f5es.\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/kb.elipse.com.br\/#website\",\"url\":\"https:\/\/kb.elipse.com.br\/\",\"name\":\"Elipse Knowledgebase\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/kb.elipse.com.br\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/kb.elipse.com.br\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/kb.elipse.com.br\/#organization\",\"name\":\"Elipse Software\",\"url\":\"https:\/\/kb.elipse.com.br\/\",\"sameAs\":[\"http:\/\/www.facebook.com\/elipsesoftware\"],\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/kb.elipse.com.br\/wp-content\/uploads\/2019\/05\/schererelipse-com-br\/logoElipse.png\",\"contentUrl\":\"https:\/\/kb.elipse.com.br\/wp-content\/uploads\/2019\/05\/schererelipse-com-br\/logoElipse.png\",\"width\":161,\"height\":58,\"caption\":\"Elipse Software\"},\"image\":{\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/person\/def69ea453ea60b250497b89225a9f87\",\"name\":\"Elipse Software\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/kb.elipse.com.br\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/ff1f7ec38f4687b06f6851d97b3cd2d0?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/ff1f7ec38f4687b06f6851d97b3cd2d0?s=96&d=mm&r=g\",\"caption\":\"Elipse Software\"},\"url\":\"https:\/\/kb.elipse.com.br\/en\/author\/webmasterelipse-com-br\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"No\u00e7\u00f5es de VBScript no Software Elipse E3: Li\u00e7\u00e3o 10 - Procedimentos e Fun\u00e7\u00f5es.[:] - Elipse Knowledgebase","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/kb.elipse.com.br\/nocoes-de-vbscript-no-software-elipse-e3-licao-10-procedimentos-e-funcoes\/","og_locale":"en_US","og_type":"article","og_title":"[:pt]No\u00e7\u00f5es de VBScript no Software Elipse E3: Li\u00e7\u00e3o 10 - Procedimentos e Fun\u00e7\u00f5es.[:] - Elipse Knowledgebase","og_description":"[:pt]Procedimentos s\u00e3o linhas de c\u00f3digo, usadas para responder a eventos ou executar algumas a\u00e7\u00f5es. Os procedimentos n\u00e3o retornam valores e s\u00e3o identificados... Autor Paula Pereira En\u00e9as[:]","og_url":"https:\/\/kb.elipse.com.br\/nocoes-de-vbscript-no-software-elipse-e3-licao-10-procedimentos-e-funcoes\/","og_site_name":"Elipse Knowledgebase","article_publisher":"http:\/\/www.facebook.com\/elipsesoftware","article_published_time":"2019-03-25T20:34:43+00:00","article_modified_time":"2020-02-20T18:17:29+00:00","og_image":[{"url":"http:\/\/kb.elipse.com.br\/pt-br\/images\/ID2104\/fig_017.bmp"}],"author":"Elipse Software","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Elipse Software","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/kb.elipse.com.br\/nocoes-de-vbscript-no-software-elipse-e3-licao-10-procedimentos-e-funcoes\/#article","isPartOf":{"@id":"https:\/\/kb.elipse.com.br\/nocoes-de-vbscript-no-software-elipse-e3-licao-10-procedimentos-e-funcoes\/"},"author":{"name":"Elipse Software","@id":"https:\/\/kb.elipse.com.br\/#\/schema\/person\/def69ea453ea60b250497b89225a9f87"},"headline":"No\u00e7\u00f5es de VBScript no Software Elipse E3: Li\u00e7\u00e3o 10 &#8211; Procedimentos e Fun\u00e7\u00f5es.","datePublished":"2019-03-25T20:34:43+00:00","dateModified":"2020-02-20T18:17:29+00:00","mainEntityOfPage":{"@id":"https:\/\/kb.elipse.com.br\/nocoes-de-vbscript-no-software-elipse-e3-licao-10-procedimentos-e-funcoes\/"},"wordCount":211,"commentCount":0,"publisher":{"@id":"https:\/\/kb.elipse.com.br\/#organization"},"articleSection":["Elipse E3","Scripts"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/kb.elipse.com.br\/nocoes-de-vbscript-no-software-elipse-e3-licao-10-procedimentos-e-funcoes\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/kb.elipse.com.br\/nocoes-de-vbscript-no-software-elipse-e3-licao-10-procedimentos-e-funcoes\/","url":"https:\/\/kb.elipse.com.br\/nocoes-de-vbscript-no-software-elipse-e3-licao-10-procedimentos-e-funcoes\/","name":"[:pt]No\u00e7\u00f5es de VBScript no Software Elipse E3: Li\u00e7\u00e3o 10 - Procedimentos e Fun\u00e7\u00f5es.[:] - Elipse Knowledgebase","isPartOf":{"@id":"https:\/\/kb.elipse.com.br\/#website"},"datePublished":"2019-03-25T20:34:43+00:00","dateModified":"2020-02-20T18:17:29+00:00","breadcrumb":{"@id":"https:\/\/kb.elipse.com.br\/nocoes-de-vbscript-no-software-elipse-e3-licao-10-procedimentos-e-funcoes\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/kb.elipse.com.br\/nocoes-de-vbscript-no-software-elipse-e3-licao-10-procedimentos-e-funcoes\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/kb.elipse.com.br\/nocoes-de-vbscript-no-software-elipse-e3-licao-10-procedimentos-e-funcoes\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"In\u00edcio","item":"https:\/\/kb.elipse.com.br\/en\/"},{"@type":"ListItem","position":2,"name":"No\u00e7\u00f5es de VBScript no Software Elipse E3: Li\u00e7\u00e3o 10 &#8211; Procedimentos e Fun\u00e7\u00f5es."}]},{"@type":"WebSite","@id":"https:\/\/kb.elipse.com.br\/#website","url":"https:\/\/kb.elipse.com.br\/","name":"Elipse Knowledgebase","description":"","publisher":{"@id":"https:\/\/kb.elipse.com.br\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/kb.elipse.com.br\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/kb.elipse.com.br\/#organization","name":"Elipse Software","url":"https:\/\/kb.elipse.com.br\/","sameAs":["http:\/\/www.facebook.com\/elipsesoftware"],"logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/kb.elipse.com.br\/#\/schema\/logo\/image\/","url":"https:\/\/kb.elipse.com.br\/wp-content\/uploads\/2019\/05\/schererelipse-com-br\/logoElipse.png","contentUrl":"https:\/\/kb.elipse.com.br\/wp-content\/uploads\/2019\/05\/schererelipse-com-br\/logoElipse.png","width":161,"height":58,"caption":"Elipse Software"},"image":{"@id":"https:\/\/kb.elipse.com.br\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/kb.elipse.com.br\/#\/schema\/person\/def69ea453ea60b250497b89225a9f87","name":"Elipse Software","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/kb.elipse.com.br\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/ff1f7ec38f4687b06f6851d97b3cd2d0?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ff1f7ec38f4687b06f6851d97b3cd2d0?s=96&d=mm&r=g","caption":"Elipse Software"},"url":"https:\/\/kb.elipse.com.br\/en\/author\/webmasterelipse-com-br\/"}]}},"_links":{"self":[{"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/posts\/1354"}],"collection":[{"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/comments?post=1354"}],"version-history":[{"count":3,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/posts\/1354\/revisions"}],"predecessor-version":[{"id":10245,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/posts\/1354\/revisions\/10245"}],"wp:attachment":[{"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/media?parent=1354"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/categories?post=1354"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kb.elipse.com.br\/en\/wp-json\/wp\/v2\/tags?post=1354"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}