SlideShare une entreprise Scribd logo
1  sur  12
Departamento de Programación
Y Tecnología Educativa                                Subprogramas

  Subprogramas

  Es un conjunto de instrucciones que ejecutan una tarea
  específica.


  Pueden ser de dos tipos:


                               Subprograma Sub


                               Subprograma Function

                                                                    Septiembre 2007
                                                           mrodriguez@unimet.edu.ve
Departamento de Programación
 Y Tecnología Educativa                         Subprogramas
Subprogramas tipo SUB
  Cuando el subprograma es invocado, ejecuta las instrucciones
  y luego el control regresa al módulo que lo invocó.




      Invocación


      Ejecución

Indica que
debe retornar
adonde fue
invocado
                                                                 Septiembre 2007
                                                        mrodriguez@unimet.edu.ve
Departamento de Programación
Y Tecnología Educativa                                           Subprogramas

Subprogramas tipo SUB
    Sintaxis de la declaración:
                   Sub Identificador (argumentos o parámetros)
                               Instrucciones
                   End Sub


    Donde:
    Sub y End Sub son palabras reservadas o keywords.

    Identificador es el nombre asignado al subprograma.

    Argumentos o parámetros permiten pasar información al
    Sub. Son opcionales y por ahora sólo pondremos ( )
                                                                               Septiembre 2007
                                                                      mrodriguez@unimet.edu.ve
Departamento de Programación
Y Tecnología Educativa                        Subprogramas

Subprogramas tipo SUB



    Sintaxis de la invocación:
                   Call identificador

    Donde:
    Call es palabra reservada o keyword.

    Identificador es el nombre asignado al subprograma que
    queremos ejecutar.


                                                              Septiembre 2007
                                                     mrodriguez@unimet.edu.ve
Departamento de Programación
Y Tecnología Educativa                             ¿Recuerdas este diagrama
                                                                 jerárquico?

   Cada subtarea representa un submódulo en nuestro programa. En las
   próximas láminas puedes ver cómo se codificaría cada una. No te
   preocupes si no entiendes algunas instrucciones o si algún SUB está
   vacío, aún no hemos llegado a ese nivel de detalle.


                                              Sección



                               Inicio         Alumno                 Final



                Ini_Aux                 Lee_Nom            Cal_Fin           Esc_Fin



             Lee_Not            Cal_Pro       Actualizar       Esc_Rep         Lee_Nom
                                                                                            Septiembre 2007
                                                                                   mrodriguez@unimet.edu.ve
Departamento de Programación
Y Tecnología Educativa         Módulo Principal




                                                Septiembre 2007
                                       mrodriguez@unimet.edu.ve
Departamento de Programación
Y Tecnología Educativa         Módulo Inicio




                                             Septiembre 2007
                                    mrodriguez@unimet.edu.ve
Departamento de Programación
Y Tecnología Educativa         Módulo Inicio




                                             Septiembre 2007
                                    mrodriguez@unimet.edu.ve
Departamento de Programación
Y Tecnología Educativa         Módulo Alumno




                                              Septiembre 2007
                                     mrodriguez@unimet.edu.ve
Departamento de Programación
Y Tecnología Educativa         Módulo Alumno




                                              Septiembre 2007
                                     mrodriguez@unimet.edu.ve
Departamento de Programación
Y Tecnología Educativa         Módulo Final




                                            Septiembre 2007
                                   mrodriguez@unimet.edu.ve
Departamento de Programación
Y Tecnología Educativa         Módulo Final




                                            Septiembre 2007
                                   mrodriguez@unimet.edu.ve

Contenu connexe

Dernier

La empresa sostenible: Principales Características, Barreras para su Avance y...
La empresa sostenible: Principales Características, Barreras para su Avance y...La empresa sostenible: Principales Características, Barreras para su Avance y...
La empresa sostenible: Principales Características, Barreras para su Avance y...
JonathanCovena1
 
PLAN DE REFUERZO ESCOLAR primaria (1).docx
PLAN DE REFUERZO ESCOLAR primaria (1).docxPLAN DE REFUERZO ESCOLAR primaria (1).docx
PLAN DE REFUERZO ESCOLAR primaria (1).docx
lupitavic
 
Curso = Metodos Tecnicas y Modelos de Enseñanza.pdf
Curso = Metodos Tecnicas y Modelos de Enseñanza.pdfCurso = Metodos Tecnicas y Modelos de Enseñanza.pdf
Curso = Metodos Tecnicas y Modelos de Enseñanza.pdf
Francisco158360
 

Dernier (20)

GUIA DE CIRCUNFERENCIA Y ELIPSE UNDÉCIMO 2024.pdf
GUIA DE CIRCUNFERENCIA Y ELIPSE UNDÉCIMO 2024.pdfGUIA DE CIRCUNFERENCIA Y ELIPSE UNDÉCIMO 2024.pdf
GUIA DE CIRCUNFERENCIA Y ELIPSE UNDÉCIMO 2024.pdf
 
La empresa sostenible: Principales Características, Barreras para su Avance y...
La empresa sostenible: Principales Características, Barreras para su Avance y...La empresa sostenible: Principales Características, Barreras para su Avance y...
La empresa sostenible: Principales Características, Barreras para su Avance y...
 
Qué es la Inteligencia artificial generativa
Qué es la Inteligencia artificial generativaQué es la Inteligencia artificial generativa
Qué es la Inteligencia artificial generativa
 
Ejercicios de PROBLEMAS PAEV 6 GRADO 2024.pdf
Ejercicios de PROBLEMAS PAEV 6 GRADO 2024.pdfEjercicios de PROBLEMAS PAEV 6 GRADO 2024.pdf
Ejercicios de PROBLEMAS PAEV 6 GRADO 2024.pdf
 
Estrategias de enseñanza-aprendizaje virtual.pptx
Estrategias de enseñanza-aprendizaje virtual.pptxEstrategias de enseñanza-aprendizaje virtual.pptx
Estrategias de enseñanza-aprendizaje virtual.pptx
 
Plan Refuerzo Escolar 2024 para estudiantes con necesidades de Aprendizaje en...
Plan Refuerzo Escolar 2024 para estudiantes con necesidades de Aprendizaje en...Plan Refuerzo Escolar 2024 para estudiantes con necesidades de Aprendizaje en...
Plan Refuerzo Escolar 2024 para estudiantes con necesidades de Aprendizaje en...
 
La triple Naturaleza del Hombre estudio.
La triple Naturaleza del Hombre estudio.La triple Naturaleza del Hombre estudio.
La triple Naturaleza del Hombre estudio.
 
proyecto de mayo inicial 5 añitos aprender es bueno para tu niño
proyecto de mayo inicial 5 añitos aprender es bueno para tu niñoproyecto de mayo inicial 5 añitos aprender es bueno para tu niño
proyecto de mayo inicial 5 añitos aprender es bueno para tu niño
 
Fe contra todo pronóstico. La fe es confianza.
Fe contra todo pronóstico. La fe es confianza.Fe contra todo pronóstico. La fe es confianza.
Fe contra todo pronóstico. La fe es confianza.
 
Medición del Movimiento Online 2024.pptx
Medición del Movimiento Online 2024.pptxMedición del Movimiento Online 2024.pptx
Medición del Movimiento Online 2024.pptx
 
TIPOLOGÍA TEXTUAL- EXPOSICIÓN Y ARGUMENTACIÓN.pptx
TIPOLOGÍA TEXTUAL- EXPOSICIÓN Y ARGUMENTACIÓN.pptxTIPOLOGÍA TEXTUAL- EXPOSICIÓN Y ARGUMENTACIÓN.pptx
TIPOLOGÍA TEXTUAL- EXPOSICIÓN Y ARGUMENTACIÓN.pptx
 
PLAN DE REFUERZO ESCOLAR primaria (1).docx
PLAN DE REFUERZO ESCOLAR primaria (1).docxPLAN DE REFUERZO ESCOLAR primaria (1).docx
PLAN DE REFUERZO ESCOLAR primaria (1).docx
 
Sesión de aprendizaje Planifica Textos argumentativo.docx
Sesión de aprendizaje Planifica Textos argumentativo.docxSesión de aprendizaje Planifica Textos argumentativo.docx
Sesión de aprendizaje Planifica Textos argumentativo.docx
 
SELECCIÓN DE LA MUESTRA Y MUESTREO EN INVESTIGACIÓN CUALITATIVA.pdf
SELECCIÓN DE LA MUESTRA Y MUESTREO EN INVESTIGACIÓN CUALITATIVA.pdfSELECCIÓN DE LA MUESTRA Y MUESTREO EN INVESTIGACIÓN CUALITATIVA.pdf
SELECCIÓN DE LA MUESTRA Y MUESTREO EN INVESTIGACIÓN CUALITATIVA.pdf
 
Caja de herramientas de inteligencia artificial para la academia y la investi...
Caja de herramientas de inteligencia artificial para la academia y la investi...Caja de herramientas de inteligencia artificial para la academia y la investi...
Caja de herramientas de inteligencia artificial para la academia y la investi...
 
AFICHE EL MANIERISMO HISTORIA DE LA ARQUITECTURA II
AFICHE EL MANIERISMO HISTORIA DE LA ARQUITECTURA IIAFICHE EL MANIERISMO HISTORIA DE LA ARQUITECTURA II
AFICHE EL MANIERISMO HISTORIA DE LA ARQUITECTURA II
 
BIOMETANO SÍ, PERO NO ASÍ. LA NUEVA BURBUJA ENERGÉTICA
BIOMETANO SÍ, PERO NO ASÍ. LA NUEVA BURBUJA ENERGÉTICABIOMETANO SÍ, PERO NO ASÍ. LA NUEVA BURBUJA ENERGÉTICA
BIOMETANO SÍ, PERO NO ASÍ. LA NUEVA BURBUJA ENERGÉTICA
 
Curso = Metodos Tecnicas y Modelos de Enseñanza.pdf
Curso = Metodos Tecnicas y Modelos de Enseñanza.pdfCurso = Metodos Tecnicas y Modelos de Enseñanza.pdf
Curso = Metodos Tecnicas y Modelos de Enseñanza.pdf
 
ACERTIJO DE POSICIÓN DE CORREDORES EN LA OLIMPIADA. Por JAVIER SOLIS NOYOLA
ACERTIJO DE POSICIÓN DE CORREDORES EN LA OLIMPIADA. Por JAVIER SOLIS NOYOLAACERTIJO DE POSICIÓN DE CORREDORES EN LA OLIMPIADA. Por JAVIER SOLIS NOYOLA
ACERTIJO DE POSICIÓN DE CORREDORES EN LA OLIMPIADA. Por JAVIER SOLIS NOYOLA
 
OCTAVO SEGUNDO PERIODO. EMPRENDIEMIENTO VS
OCTAVO SEGUNDO PERIODO. EMPRENDIEMIENTO VSOCTAVO SEGUNDO PERIODO. EMPRENDIEMIENTO VS
OCTAVO SEGUNDO PERIODO. EMPRENDIEMIENTO VS
 

En vedette

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

En vedette (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Subprogramas

  • 1. Departamento de Programación Y Tecnología Educativa Subprogramas Subprogramas Es un conjunto de instrucciones que ejecutan una tarea específica. Pueden ser de dos tipos: Subprograma Sub Subprograma Function Septiembre 2007 mrodriguez@unimet.edu.ve
  • 2. Departamento de Programación Y Tecnología Educativa Subprogramas Subprogramas tipo SUB Cuando el subprograma es invocado, ejecuta las instrucciones y luego el control regresa al módulo que lo invocó. Invocación Ejecución Indica que debe retornar adonde fue invocado Septiembre 2007 mrodriguez@unimet.edu.ve
  • 3. Departamento de Programación Y Tecnología Educativa Subprogramas Subprogramas tipo SUB Sintaxis de la declaración: Sub Identificador (argumentos o parámetros) Instrucciones End Sub Donde: Sub y End Sub son palabras reservadas o keywords. Identificador es el nombre asignado al subprograma. Argumentos o parámetros permiten pasar información al Sub. Son opcionales y por ahora sólo pondremos ( ) Septiembre 2007 mrodriguez@unimet.edu.ve
  • 4. Departamento de Programación Y Tecnología Educativa Subprogramas Subprogramas tipo SUB Sintaxis de la invocación: Call identificador Donde: Call es palabra reservada o keyword. Identificador es el nombre asignado al subprograma que queremos ejecutar. Septiembre 2007 mrodriguez@unimet.edu.ve
  • 5. Departamento de Programación Y Tecnología Educativa ¿Recuerdas este diagrama jerárquico? Cada subtarea representa un submódulo en nuestro programa. En las próximas láminas puedes ver cómo se codificaría cada una. No te preocupes si no entiendes algunas instrucciones o si algún SUB está vacío, aún no hemos llegado a ese nivel de detalle. Sección Inicio Alumno Final Ini_Aux Lee_Nom Cal_Fin Esc_Fin Lee_Not Cal_Pro Actualizar Esc_Rep Lee_Nom Septiembre 2007 mrodriguez@unimet.edu.ve
  • 6. Departamento de Programación Y Tecnología Educativa Módulo Principal Septiembre 2007 mrodriguez@unimet.edu.ve
  • 7. Departamento de Programación Y Tecnología Educativa Módulo Inicio Septiembre 2007 mrodriguez@unimet.edu.ve
  • 8. Departamento de Programación Y Tecnología Educativa Módulo Inicio Septiembre 2007 mrodriguez@unimet.edu.ve
  • 9. Departamento de Programación Y Tecnología Educativa Módulo Alumno Septiembre 2007 mrodriguez@unimet.edu.ve
  • 10. Departamento de Programación Y Tecnología Educativa Módulo Alumno Septiembre 2007 mrodriguez@unimet.edu.ve
  • 11. Departamento de Programación Y Tecnología Educativa Módulo Final Septiembre 2007 mrodriguez@unimet.edu.ve
  • 12. Departamento de Programación Y Tecnología Educativa Módulo Final Septiembre 2007 mrodriguez@unimet.edu.ve