/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#+
#+     Mumps Bioinformatics Software Library
#+     Copyright (C) 2003 - 2025  by Kevin C. O'Kane
#+
#+     Kevin C. O'Kane
#+     kc.okane@gmail.com
#+     okane@uni.edu
#+     https://threadsafebooks.com/
#+     https://www.cs.uni.edu/~okane
#+
#+ This program is free software; you can redistribute it and/or modify
#+ it under the terms of the GNU General Public License as published by
#+ the Free Software Foundation; either version 2 of the License, or
#+ (at your option) any later version.
#+
#+ This program is distributed in the hope that it will be useful,
#+ but WITHOUT ANY WARRANTY; without even the implied warranty of
#+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#+ GNU General Public License for more details.
#+
#+ You should have received a copy of the GNU General Public License
#+ along with this program; if not, write to the Free Software
#+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#+
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/

//	April 21, 2025

//--------------------------------
// To compile:
//    mumpsc global1.cpp
//
// To run:
//    global1
//--------------------------------

#include <stdio.h>
#include <stdlib.h>

#include <mumpsc/libmpscpp.h>

int	main() {

    global a("a");

    int i;

    a("").Kill();
    for (i = 0; i < 100; i++) a(i) = i;
    for (i = 0; i < 100; i++) cout << a(i);
    cout << endl;
    cout << endl;

    mstring mi;

    a("").Kill();
    for (mi = 0; mi < 100; mi++) a(mi) = mi;
    for (mi = 0; mi < 100; mi++) cout << a(mi);
    cout << endl;
    cout << endl;

    a("").Kill();

    global gi("gi");

    i = 0;
    for (gi(i) = 0; gi(i) < 100; gi(i)++) a((int)gi(i)) = gi(i);
    for (gi(i) = 0; gi(i) < 100; gi(i)++) cout << a((int)gi(i));
    cout << endl;


    return 0;

    }
