source: Sophya/trunk/SophyaProg/Tests/thash.cc@ 1726

Last change on this file since 1726 was 1171, checked in by ansari, 25 years ago

Correction prog de test de codage des PPersistId - Reza 31/8/2000

File size: 662 bytes
Line 
1#include <stdio.h>
2#include <stdlib.h>
3#include <math.h>
4#include <iostream.h>
5
6#include "ppersist.h"
7int main(int narg, char *arg[])
8{
9 char * sid[3] = { "Hello","Reza","ERIC" } ;
10 uint_8 code[3];
11 int k;
12 printf(" ------- Testing SOPHYA Hash coding --------- \n");
13 printf(" Size of uint_4 = %d \n ", sizeof(uint_4));
14 printf(" Size of uint_8 = %d \n ", sizeof(uint_8));
15 printf(" Size of unsigned long = %d \n ", sizeof(unsigned long));
16 for(k=0; k<3; k++) {
17 code[k] = PPersistRegistrar<double>::Hash(sid[k]);
18 printf(" Resultat de Hash sur %s = %lx (%ld) \n", sid[k], code[k], code[k]);
19 cout << " Result--- " << code[k] << endl;
20 }
21}
Note: See TracBrowser for help on using the repository browser.