Subroutines and functions allow programmers to organize code into reusable blocks. Subroutines contain code that is executed when called but do not return a value, while functions contain code that is executed and returns a value. Both can be called with or without parameters to make them more flexible. To call a subroutine, use the Call statement or just the subroutine name. To call a function, assign its return value to a variable using the function name. The key difference is that functions return a value that can be assigned to a variable, while subroutines do not.
A simple introduction to network programming using Python 3 socket module. This material was used in a 2-day summer training at Mansoura University in August 2016.
The examples included come from other tutorials with some changes. The source code of these and other examples can be found here:
https://github.com/ksonbol/socket_examples
A simple introduction to network programming using Python 3 socket module. This material was used in a 2-day summer training at Mansoura University in August 2016.
The examples included come from other tutorials with some changes. The source code of these and other examples can be found here:
https://github.com/ksonbol/socket_examples
about visual basic
visual basic 6.0 v/s other version
visual basic programming
form in visual basic
objects in visual basic
important controls
visual basic statement
loop statement
conditional loop
do until loop
Properties are named members of classes, structures, and interfaces. Member variables or methods in a class or structures are called Fields. Properties are an extension of fields and are accessed using the same syntax. They use accessors through which the values of the private fields can be read, written, or manipulated.
An indexer allows an object to be indexed such as an array. When you define an indexer for a class, this class behaves similar to a virtual array. You can then access the instance of this class using the array access operator ([ ]).
about visual basic
visual basic 6.0 v/s other version
visual basic programming
form in visual basic
objects in visual basic
important controls
visual basic statement
loop statement
conditional loop
do until loop
Properties are named members of classes, structures, and interfaces. Member variables or methods in a class or structures are called Fields. Properties are an extension of fields and are accessed using the same syntax. They use accessors through which the values of the private fields can be read, written, or manipulated.
An indexer allows an object to be indexed such as an array. When you define an indexer for a class, this class behaves similar to a virtual array. You can then access the instance of this class using the array access operator ([ ]).
Thinking of getting a dog? Be aware that breeds like Pit Bulls, Rottweilers, and German Shepherds can be loyal and dangerous. Proper training and socialization are crucial to preventing aggressive behaviors. Ensure safety by understanding their needs and always supervising interactions. Stay safe, and enjoy your furry friends!
2024.06.01 Introducing a competency framework for languag learning materials ...Sandy Millin
http://sandymillin.wordpress.com/iateflwebinar2024
Published classroom materials form the basis of syllabuses, drive teacher professional development, and have a potentially huge influence on learners, teachers and education systems. All teachers also create their own materials, whether a few sentences on a blackboard, a highly-structured fully-realised online course, or anything in between. Despite this, the knowledge and skills needed to create effective language learning materials are rarely part of teacher training, and are mostly learnt by trial and error.
Knowledge and skills frameworks, generally called competency frameworks, for ELT teachers, trainers and managers have existed for a few years now. However, until I created one for my MA dissertation, there wasn’t one drawing together what we need to know and do to be able to effectively produce language learning materials.
This webinar will introduce you to my framework, highlighting the key competencies I identified from my research. It will also show how anybody involved in language teaching (any language, not just English!), teacher training, managing schools or developing language learning materials can benefit from using the framework.
Delivering Micro-Credentials in Technical and Vocational Education and TrainingAG2 Design
Explore how micro-credentials are transforming Technical and Vocational Education and Training (TVET) with this comprehensive slide deck. Discover what micro-credentials are, their importance in TVET, the advantages they offer, and the insights from industry experts. Additionally, learn about the top software applications available for creating and managing micro-credentials. This presentation also includes valuable resources and a discussion on the future of these specialised certifications.
For more detailed information on delivering micro-credentials in TVET, visit this https://tvettrainer.com/delivering-micro-credentials-in-tvet/
Safalta Digital marketing institute in Noida, provide complete applications that encompass a huge range of virtual advertising and marketing additives, which includes search engine optimization, virtual communication advertising, pay-per-click on marketing, content material advertising, internet analytics, and greater. These university courses are designed for students who possess a comprehensive understanding of virtual marketing strategies and attributes.Safalta Digital Marketing Institute in Noida is a first choice for young individuals or students who are looking to start their careers in the field of digital advertising. The institute gives specialized courses designed and certification.
for beginners, providing thorough training in areas such as SEO, digital communication marketing, and PPC training in Noida. After finishing the program, students receive the certifications recognised by top different universitie, setting a strong foundation for a successful career in digital marketing.
How to Add Chatter in the odoo 17 ERP ModuleCeline George
In Odoo, the chatter is like a chat tool that helps you work together on records. You can leave notes and track things, making it easier to talk with your team and partners. Inside chatter, all communication history, activity, and changes will be displayed.
Macroeconomics- Movie Location
This will be used as part of your Personal Professional Portfolio once graded.
Objective:
Prepare a presentation or a paper using research, basic comparative analysis, data organization and application of economic information. You will make an informed assessment of an economic climate outside of the United States to accomplish an entertainment industry objective.
A workshop hosted by the South African Journal of Science aimed at postgraduate students and early career researchers with little or no experience in writing and publishing journal articles.
Executive Directors Chat Leveraging AI for Diversity, Equity, and InclusionTechSoup
Let’s explore the intersection of technology and equity in the final session of our DEI series. Discover how AI tools, like ChatGPT, can be used to support and enhance your nonprofit's DEI initiatives. Participants will gain insights into practical AI applications and get tips for leveraging technology to advance their DEI goals.
it describes the bony anatomy including the femoral head , acetabulum, labrum . also discusses the capsule , ligaments . muscle that act on the hip joint and the range of motion are outlined. factors affecting hip joint stability and weight transmission through the joint are summarized.
2. What is/are Subroutines?
A subroutine has a name attributed with it, much
like a variable does. Unlike a variable, a
subroutine doesn't hold data. Instead, it holds
code.
For example, the Form_Load subroutine is
automatically called when a form loads. This is
where you have been inserting your test code
before. What you were actually doing was adding
code to this subroutine.
3. What is/are Functions?
Functions are basically the exact same as
subroutines, except that they return a value.
That means that the function itself has a
type, and the function will return a value to
the calling subroutine based on the code
that it contains.
A function is declared the exact same way as
a subroutine, except using the "Function"
keyword instead of "Sub".
4. The difference between a
Subs and a Functions
Sub does not produce a return value (one
that can be assigned directly to a variable)
whereas a
Function does produce a return value.
Both Subroutines and Functions can be
called with or without parameters.
5. Calling a Sub Without Parameters
To call a Sub, you use the
Call statement. Example,
the statement below calls
a Sub named "AddNum".
Call AddNum
This would cause VB to
execute the statements
in the Sub named
"AddEm" and then
return to the statement
following the Call.
Private Sub AddNum()
[statements]
End Sub
The keyword "Call" is optional, thus a
call can be made simply by coding the
name of the Sub:
AddNum ' same as "Call AddNum"
6. Example of Calling a Sub Without Parameters
Option Explicit ‘which requires that you declare every variable before you use it.
Dim mintNum1 As Integer
Dim mintNum2 As Integer
Dim mintSum As Integer
Private Sub cmdTryIt_Click()
mintNum1 = Val(InputBox("Enter first number:", "Add Program"))
mintNum2 = Val(InputBox("Enter second number:", "Add Program"))
AddNum ' Could also be coded as "Call AddNum()" with or without the ()
Print "The sum is "; mintSum
End Sub
Private Sub AddNum()
mintSum = mintNum1 + mintNum2
End Sub
7. Calling a Sub With Parameters
A Sub Procedure will be expecting one or more
parameters. This enhances the reusability and
flexibility of the Sub procedure. The full syntax for
a Sub procedure is:
[Private | Public] Sub SubName[(parameter list)]
[statements]
End Sub
where "parameter list" is a comma-separated
list of the parameter variables with their data
types (ex. var1 As datatype, var2 As datatype,
etc.).
Example: Private Sub AddNum(pintNum1 As Integer, pintNum2 As Integer, pintSum As Integer)
The CALL can be coded in one of two ways.
Call AddNum(intNum1, intNum2, intSum)
or
AddEm intNum1, intNum2, intSum
With the naming conventions use to start
the variable names of the parameters in
a Sub or Function header with the letter
"p" for "parameter
8. Example of Calling a Sub With Parameters
Private Sub cmdTryIt_Click()
' The variables can be declared at the local level
Dim intNum1 As Integer
Dim intNum2 As Integer
Dim intSum As Integer
intNum1 = Val(InputBox("Enter first number:", "Add Program"))
intNum2 = Val(InputBox("Enter second number:", "Add Program"))
AddNum intNum1, intNum2, intSum
' Could also be coded as:' Call AddNum(intNum1, intNum2, intSum)
Print "The sum is "; intSum
End Sub
Private Sub AddNum(pintNum1 As Integer, pintNum2 As Integer, pintSum As Integer)
pintSum = pintNum1 + pintNum2
End Sub
9. Calling a Function
To call a Function, the syntax is identical to an assignment statement that uses a
VB built-in function:
VariableName = FunctionName[(argument list)]
For example, if you made a function called "AddNum" that returned a value (like
the sum, for example), you could invoke the function as follows:
intSum = AddEm(intNum1, intNum2)
The above statement would cause the following to happen:
1. The procedure AddNum would be called, passing intNum1 and intNum2
2. The AddNum procedure would add the values of intNum1 and intNum2 to produce its
return value, the sum.
3. When the AddNum procedure exits, its return value would be stored in the variable
intSum
10. The format of the Function
Procedure
[Private | Public] Function FunctionName
[(parameter list)] [As datatype]
[statements]
FunctionName = value
[statements]
End Function
11. Example of Calling a Function
Option Explicit
. . .
Private Sub cmdTryIt_Click()
' The variables can be declared at the local level
Dim intNum1 As Integer
Dim intNum2 As Integer
Dim intSum As Integer
intNum1 = Val(InputBox("Enter first number:", "Add Program"))
intNum2 = Val(InputBox("Enter second number:", "Add Program"))
intSum = AddNum(intNum1, intNum2)
Print "The sum is "; intSum
End Sub
Private Function AddNum(pintNum1 As Integer,pintNum2 As
Integer) As Integer
AddNum= pintNum1 + pintNum2
End Function
12. Laboratory Hands-on Exercise:
Apply the Subroutines and Functions in a Simple
Math Operation (that can add, subtract, multiply
and divide)
Filenames: UsingSubs.vbp and UsingFunctions.vbp
In the last line of the program/code answer the
question and put as remarks to avoid errors. What
do you think the best way to determine which is
better?