Ask AI
Skip to main content

Create a double

Function: Create a double

This action allows you to create a new variable in your application's memory (called the "variable scope") and store a number with decimal places in it. This is useful for holding values like prices, percentages, measurements, or any other numerical data that might have fractions.

Input

  • Variable Name:
    • Description: The unique label you want to give to your new variable. This name will be used to refer to this variable later in your application.
    • Type: Text (STRING)
    • Required: Yes
  • Value:
    • Description: The number with decimal places you want to store in this variable. For example, 3.14, 99.99, or 0.5.
    • Type: Number with Decimals (DOUBLE)
    • Required: No (If not provided, the variable will be created with a default value of 0.0)

Output

  • Variable Name:
    • Description: The name of the variable that was successfully created. This output can be used to confirm the creation or to reference the variable in subsequent actions.
    • Type: Text (STRING)

Execution Flow

Real-Life Examples

Example 1: Storing a Calculated Tax Rate

Imagine you need to store a specific tax rate that includes decimals for calculations in an order processing flow.

  • Inputs:
    • Variable Name: SalesTaxRate
    • Value: 0.075
  • Result: A new variable named SalesTaxRate is created in your application's memory, holding the value 0.075. The output Variable Name will be SalesTaxRate.

Example 2: Tracking a Discount Percentage

You want to apply a special discount percentage to certain products.

  • Inputs:
    • Variable Name: SpecialDiscount
    • Value: 0.15
  • Result: A new variable named SpecialDiscount is created, storing the value 0.15. The output Variable Name will be SpecialDiscount.

Example 3: Recording a Measurement

In an inventory system, you might need to store the weight of an item, which could be a decimal number.

  • Inputs:
    • Variable Name: ItemWeightKg
    • Value: 2.75
  • Result: A new variable named ItemWeightKg is created, holding the value 2.75. The output Variable Name will be ItemWeightKg.