Serial Does Not Name A Type

I get the following error when I run the code below: "Serial Does Not Name A Type"

//#include <SoftwareSerial.h>
//#include <print.h>
//#include <print.cpp>
//#include <ProfileTimer.h>
#include <BigNumber.h>
//#include <BigNumber.cpp>

//BigNumber::begin(); //initialize library

void setup() {
Serial.begin (9600);
Serial.println ();
Serial.println ();
BigNumber::begin (40); // initialize library
BigNumber::setScale (15);

// char R0[32] = {0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,1,0,1,1,1,0,0,0,0,0}; // default 0x02006E0
//int R1[32] = {0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,1}; // default 0x0AD5551
// int R2[32] = {0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,1,0}; // default 0x08006002
// int R3[32] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1}; // default 0x00000003
// int R4[32] = {0,0,0,1,1,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,1,0,1,1,1,0,0,0,0,1,0,0}; // default 0x32008B84
// int R5[32] = {0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,1}; // default 0x000800025
// int R6[32] = {0,0,1,1,0,1,0,1,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,1,1,1,0,1,1,0}; // default 0x035012076
// int R7[32] = {0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1}; // default 0x012000007
// int R8[32] = {0,0,0,1,0,0,0,0,0,0,1,0,1,1,0,1,0,0,0,0,0,1,0,0,0,0,1,0,1,0,0,0}; // default 0x0102D0428
// int R9[32] = {0,0,0,1,1,0,1,0,0,0,0,1,1,0,0,1,1,1,1,1,1,1,0,0,1,1,0,0,1,0,0,1}; // default 0x01A19FCC9
// int R10[32] = {0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,1,0,0,1,1,0,1,0,1,1,1,0,1,0}; // default 0x000C026BA
// int R11[32] = {0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,1,0,0,1,1,0,0,0,0,0,0,0,0,1,0,1,1}; // default 0x00061300B
// int R12[32] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,1,1,0,0}; // default 0x00000041C

//string sbuf[]={

// String sbuf[] = {"68","00.0","000","00","122","880","000","1","N","Y","Enable","Disable",
// "110","11","359","573","512","1536","16","777","216","61","44","110","677","0833","3333","3333","6800","000","000","1","Enable","4/5","2006E0",
// "AD5551", "8006002", "Disable", "Disable", "Disable", "0", "3", "Digital Lock Detect", "Disable", "0.900", "Differential", "3.0v", "Positive", "Disable", "Disable", "Disable", "32008B84",
// "800025", "Fundamental", "Enable", "9", "Disable", "Enable", "Enable", "+5dBm", "Enable"};
//String sbuf2[] = {"Disable",
//"35012076", "REFin", "Disable" ,"5.0ns","Frac-N", "12000007", "102D0428", "Enable", "26", "103",
//"30", "12", "2840", "592", "1A19FCC9", "Enable", "154", "99", "417", "Enable", "Enable", "C026BA", "613008", "0", "0",
//"41C", "60", "00.0", "000", "00", "60", "10.0", "000", "00", "1", "100", "40", "00.0", "000", "00", "41", "00.0", "000", "00", "100", "1"};

// test multiplication
BigNumber Integer = 110;
BigNumber FRAC1 = "11359573";
BigNumber FRAC2 = "512";
BigNumber MOD2 = "1536";
BigNumber MOD1 = "16777216";
BigNumber PFD = "61440000";

// test multiplication

Serial.println (1000.555);
BigNumber N11 = FRAC2 / MOD2;
BigNumber N1 = FRAC1 + N11;
BigNumber N2 = N1/MOD1;
BigNumber N3 = Integer + N2;
BigNumber N4 = PFD * N3;

//BigNumber testd = "100.5666666666666666666666666666655";
//char s = testd.toString();
Serial.println (N11);
Serial.println (N1);
Serial.println (N2);
Serial.println (N3);
Serial.println (N4);
// Serial.print("ddd = ");
// Serial.print(s);
Serial.println("");
int i;
// for (i=0;i<=60;i++){
// Serial.println(sbuf
);*
// }
}
String N7 = getHex("1000");
Serial.println(N7);
String getHex (String Binary)

  • { String rest("0x"), tmp,chr="0000"; *

  • int len = Binary.length()/4;*

  • //chr = chr.substring(0,len);*

  • //Binary = chr+Binary;*

  • for (int i = 0; i<Binary.length();i+=4)*

  • { tmp = Binary.substring(i,4);*

  • if (!tmp.compareTo("0000"))*

  • {*

  • rest = rest + "0";*

  • }*

  • else if (!tmp.compareTo("0001"))*

  • {*

  • rest = rest + "1";*

  • }*

  • else if (!tmp.compareTo("0010"))*

  • {*

  • rest = rest + "2";*

  • }*

  • else if (!tmp.compareTo("0011"))*

  • {*

  • rest = rest + "3";*

  • }*

  • else if (!tmp.compareTo("0100"))*

  • {*

  • rest = rest + "4";*

  • }*

  • else if (!tmp.compareTo("0101"))*

  • {*

  • rest = rest + "5";*

  • }*

  • else if (!tmp.compareTo("0110"))*

  • {*

  • rest = rest + "6";*

  • }*

  • else if (!tmp.compareTo("0111"))*

  • {*

  • rest = rest + "7";*

  • }*

  • else if (!tmp.compareTo("1000"))*

  • {*

  • rest = rest + "8";*

  • }*

  • else if (!tmp.compareTo("1001"))*

  • {*

  • rest = rest + "9";*

  • }*

  • else if (!tmp.compareTo("1010"))*

  • {*

  • rest = rest + "A";*

  • }*

  • else if (!tmp.compareTo("1011"))*

  • {*

  • rest = rest + "B";*

  • }*

  • else if (!tmp.compareTo("1100"))*

  • {*

  • rest = rest + "C";*

  • }*

  • else if (!tmp.compareTo("1101"))*

  • {*

  • rest = rest + "D";*

  • }*

  • else if (!tmp.compareTo("1110"))*

  • {*

  • rest = rest + "E";*

  • }*

  • else if (!tmp.compareTo("1111"))*

  • {*

  • rest = rest + "F";*

  • }*

  • continue;*

  • }*

  • return rest;*

  • }*

void loop () { }

Might just need " " around the digits here:
Serial.println (1000.555);

String N7  = getHex("1000");
[color=red]Serial.println(N7);[/color]

Can't do that outside a function.

thanks