demo.g - The Demo Start-Up mini-program

Cogent Tools Demo and Tutorials: Version 4.0
Prev | Chapter 3. View the Code | Next

# 3.2. `demo.g` - The Demo Start-Up mini-program

    /*--------------------------------------------------------------------
     * File:        demo.g
     *
     * Description: This program starts the demo.
     *------------------------------------------------------------------*/

    /*--------------------------------------------------------------------
     * Function:    main
     * Returns:     doesn't return
     * Description: Calls gtkcontrol.g or phcontrol.g, depending on the OS
     *              and/or a command line argument.
     *------------------------------------------------------------------*/
    function main()
    {
      if (_os_ == "Linux")
        system("gamma gtkcontrol.g");
      else if (_os_ == "QNX4")
        system("phgamma phcontrol.g");
      else if (_os_ == "QNX6")
        {
          if (cadr(argv) == nil)
            system("gamma phcontrol.g");
          else if (cadr(argv) == "photon")
            system("gamma phcontrol.g");
          if (cadr(argv) == "gtk")
            system("gamma gtkcontrol.g");
        }
    }

Prev | Home | Next
View the Code | Up | `gtkcontrol.g` - The Controller program in GTK

Copyright 1995-2002 by Cogent Real-Time Systems, Inc.