OneScript
  • Welcome to OneScript
  • OneScript Overview
    • Dates and Times
    • Sets
    • Types
    • Fields
      • Helper Fields
      • Labels
      • Standard Text
    • Snapshots
    • State Management
    • Future Features
  • Get OneScript
  • Macro Overview
    • Macro Virtual Machine
    • Code Instructions
  • Standard Libraries
    • Core
    • Data
    • Interview Model
  • Linker Overview
    • Objects
  • Contact Us
Powered by GitBook
On this page
  1. OneScript Overview

Snapshots

Snapshots are a unique feature of OneScript to support the ability to move back and forth in an application by defining a snapshot of the application to jump back to later.

A snapshot will hold information about the virtual machine position in the code and the restoration of a snapshot will automatically jump the flow of the application back to the statement directly after the save snapshot statement with the equivalent name.

The power of a snapshot can be appreciated within objects that support iteration, where their state can be saved between snapshots. For example,

int i = 0;
for(string value in strings) {
    snapshot save "$$$";
}   

PreviousStandard TextNextState Management

Last updated 1 year ago