A+B: Difference between revisions

Content added Content deleted
imported>PauliKL
(→‎{{header|VBScript}}: Added Vedit macro language)
imported>PauliKL
Line 5,909: Line 5,909:
=={{header|Vedit macro language}}==
=={{header|Vedit macro language}}==
This version implements the task as specified in the task description.
This version implements the task as specified in the task description.
<syntaxhighlight lang="vedit">Get_Input(10, "Enter two integers separated by a space: ")
<syntaxhighlight lang="vedit">// Input two values on single line in text format
Get_Input(10, "Enter two integers separated by a space: ")

// Extract two numeric values from the text
Buf_Switch(Buf_Free)
Buf_Switch(Buf_Free)
Reg_Ins(10)
Reg_Ins(10)
Line 5,915: Line 5,918:
#1 = Num_Eval(ADVANCE)
#1 = Num_Eval(ADVANCE)
#2 = Num_Eval()
#2 = Num_Eval()
Buf_Quit(OK)
Num_Type(#1 + #2)

Buf_Quit(OK)</syntaxhighlight>
// Calculate and display the results
Num_Type(#1 + #2)</syntaxhighlight>


A simpler version that prompts for the two numbers separately:
A simpler version that prompts for the two numbers separately: