// $Id: xxl_upper.cc,v 1.4 1996/12/11 21:39:54 aml Exp $

// This function changes the value of the string in place !!

#include "xxl_funcs.hh"
#include "sheet.hh"


Stack_elem *Upper::eval(Stack_elem *p,Sheet *sheet, short col, short row) {
    int i;
    char *st;

    se = p;

    st = sheet->stack_string(p);

    if (st == NULL)
      se->contents.string_val[0] = 0;
    else {
      for(i=0; st[i] != 0; i++) 
        se->contents.string_val[i] = toupper(st[i]);
      se->contents.string_val[i] = 0;
    }
    se->type = FORM_STRING;
    return(se);
}

Upper::Upper() {
  //    se = new Stack_elem;
}

Upper::~Upper() {
  //delete se;
}

// $Log: xxl_upper.cc,v $
// Revision 1.4  1996/12/11  21:39:54  aml
// Sumif implemented.
// Diverse time functions implemented.
// Fixed needtoscroll2 to avoid out of control scroll.
//
// Revision 1.3  1996/08/28 17:17:26  aml
// Load and save now accept string_value for formula cells.
// This fixes previous thought problem of formula values not
// being stored.
// Functions upper,lower and proper created.
// Function if can now return labels.
// Fixed problem with function count.
// Reasonably stable version, very used to manipulate notas.wk1.
//
// Revision 1.2  1996/08/27 17:18:49  aml
// First version of regressive tests created.
// Changes were made to allow for string functions.
// String function upper created. Raises the problem
// that formulas do NOT have a space for string values,
// and therefore have to be evaluated upon loading.
//
// Revision 1.1  1996/08/27 14:31:00  aml
// Initial revision
//
