程序员t5和t7差距_功能与程序之间的差异

程序员t5和t7差距

Procedure: In computer programming a specific set of instructions together called a procedure. Depending on the programming language it can be called as subroutine, subprogram or a function.

过程:在计算机编程中,一组特定的指令统称为过程。 根据编程语言的不同,它可以称为子例程,子程序或函数。

Function: It is one of the basic concept in programming of computer. As it name says, it performs a function (work). It can be either user defined or system defined. More technically it is a block of code in program which performs specific task.

功能:它是计算机编程中的基本概念之一。 顾名思义,它执行一项功能(工作)。 它可以是用户定义的,也可以是系统定义的。 从技术上讲,它是程序中执行特定任务的代码块。

功能与程序之间的差异 (Difference between Function and Procedure)

ProcedureFunction
It is set of instructions in a program.It also a set of instructions, but we can say it’s a variant of a procedure.
May or may not return a value to the code called by. It just executes commands.Functions are very similar to procedures except that they also return a value to the calling sub program.
Procedure can contain return statement.Function should contain return statement.
Procedure is set of commands executed in orderFunction is used to calculate something from given input to it. So its name came from math.
Procedure cannot be called from a function.Function can be called from a procedure.
In SQL, inside procedure we can use DML (Insert, Delete, Update) Commands.In SQL, inside functions we can’t use DML commands.
Pascal, Ada, PL/SQL are some programming languages which uses procedure.C, C++, Java are some programming languages which uses functions.
程序 功能
它是程序中的指令集。 它也是一组指令,但是我们可以说这是一个过程的变体。
可能会或可能不会将值返回给调用的代码。 它只是执行命令。 函数与过程非常相似,不同之处在于它们还向调用子程序返回一个值。
过程可以包含return语句。 函数应包含return语句。
过程是按顺序执行的命令集 函数用于根据给定的输入来计算内容。 所以它的名字来自数学。
无法从函数调用过程。 可以从过程中调用函数。
在SQL内部过程中,我们可以使用DML(插入,删除,更新)命令。 在SQL中,内部函数不能使用DML命令。
Pascal,Ada,PL / SQL是一些使用过程的编程语言。 C,C ++,Java是一些使用函数的编程语言。

翻译自: https://www.thecrazyprogrammer.com/2019/01/difference-between-function-and-procedure.html

程序员t5和t7差距

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值