1. Home
  2. /
  3. Natural-scripting
  4. /
  5. Natural Arithmetic Example

Natural Arithmetic Example - Natural-scripting Typing CST Test

Loading…

Natural Arithmetic Example — Natural-scripting Code

Compute sum and product of two numbers.

DEFINE DATA LOCAL
	1 A (N)
	1 B (N)
	1 SUM (N)
	1 PROD (N)
END-DEFINE
INPUT 'Enter A: ' A
INPUT 'Enter B: ' B
SUM := A + B
PROD := A * B
WRITE 'Sum: ' SUM
WRITE 'Product: ' PROD
END

Natural-scripting Language Guide

Natural Scripting refers to the use of the Natural programming language (from Software AG) to create applications, automate business logic, and interact with databases, especially within mainframe and enterprise environments.

Primary Use Cases

  • ▸Automating enterprise business processes
  • ▸Building database-centric applications on mainframes
  • ▸Creating batch jobs for reporting and transaction processing
  • ▸Rapid prototyping of business logic applications
  • ▸Integrating with legacy systems and middleware

Notable Features

  • ▸English-like syntax for easier readability
  • ▸Seamless integration with Adabas databases
  • ▸Supports batch, online, and event-driven applications
  • ▸High-level procedural abstractions for rapid development
  • ▸Modularization via subprograms and functions

Origin & Creator

Developed by Software AG in the 1970s as a high-level language to simplify application development on mainframe and later client-server systems.

Industrial Note

Commonly used in banking, insurance, and logistics industries for large-scale transaction processing, often interfacing with Adabas or other enterprise databases.

More Natural-scripting Typing Exercises

Simple Natural ProgramNatural Loop ExampleNatural Database Read ExampleNatural Conditional ExampleNatural Input and Display ExampleNatural Loop with DatabaseNatural Subroutine ExampleNatural String ManipulationNatural Exit Condition in Loop

Practice Other Languages

CReactPythonC++RustTypeScriptKotlinPHPJavaC#RubyMqlCqlN1qlCypher