by Francisco Antonio de Araúo e Souza (1 Submission)
Category: Math/Dates
Compatability: VB 6.0
Difficulty: Advanced
Originally Published: Sat 28th July 2018
Date Added: Tue 9th February 2021
Rating:
(1 Votes)
'OBJECTIVE: Demonstrate how a procedure and a function operate arrays     'AUTHOR: Prof. Dr. Francisco Araújo     'DATE: Fortaleza (CE), July 28, 2018     'LOCAL:: Brazil, Ceará, Fortaleza.     'DESCRIPTION: The CALCULATE procedure is executed and calls the STATISTICS function, passing the     'input matrix: 2011, 0.5, 2012, 0.7, 2013, 0.9     'The STATISTICS function verifies that the input array you received from the CALCULATE procedure is an array:     'else: return error message (a string) to the CALCULATE procedure.     'if yes: show the received data:     'the input matrix: 2011; 0.5; 2012; 0.7; 2013; 0.9     'processing this data from the input matrix,     'generate the output matrix and return it to the CALCULATE procedure.     'The CALCULATE procedure checks whether the return of the STATISTICS function is a string (the error message):     'if yes: show the error message and finish.     'else: show the return data of the function STATISTICS:     'the output matrix: 1; 1; 2; 1.4; 3; 1.8; 4; 1.5; 5; 2.1     'and finalize. 'OBJETIVO : Demonstrar como uma procedure e uma function operam matrizes 'AUTOR : Prof. Dr. Francisco Araújo 'DATA : Fortaleza(CE), 28 de Julho de 2018 'LOCAL: : Brasil, Ceará, Fortaleza. 'DESCRIÇÃO : A procedure CALCULAR é executada e chama a function ESTATISTICAS passando a ' matriz de entrada : 2011, 0.5, 2012, 0.7, 2013, 0.9 ' A function ESTATISTICAS verifica se a matriz de entrada que recebeu da procedure CALCULAR é um array: ' senão: retornar mensagem de erro (uma string) à procedure CALCULAR. ' se sim: mostrar os dados recebidos: ' a matriz de entrada: 2011; 0,5; 2012; 0,7; 2013; 0,9 ' processar esses dados da matriz de entrada, ' gerar a matriz de saÃda e retorná-la à procedure CALCULAR. ' A procedure CALCULAR verifica se o retorno da function ESTATISTICAS é uma string (a mensagem de erro): ' se sim: mostrar a mensagem de erro e finalizar. ' senão: mostrar os dados de retorno da function ESTATISTICAS: ' a matriz de saÃda: 1; 1; 2; 1,4; 3; 1,8; 4; 1,5; 5; 2,1 ' e finalizar.
Download Matrix (3 KB)