Stories's Log
This log represents the Life and Times of the Las Vegas Dude.
<< 07/2008 < 07/2009 Calendar 08/2009 > 07/2010 >>Sign InView Other Logs
Sun 
07/26/2009 14:49:15
 jim  Ross, Pa - Mad Mex
Surprisingly good food for a Surprisingly Great Price,if you don't have a Margarita
Sun 
07/26/2009 10:02:16
 jim  Work Places
Sat 
07/25/2009 16:59:56
 jim  Washington, Pa
Sat 
07/25/2009 16:07:24
 jim  Eighty Four, Pa
Sat 
07/25/2009 10:50:44
 jim  Out and About
Fri 
07/24/2009 17:48:21
 jim  More about C Data types
C Data Types found in Guardian C/C++ Programmers manual
#pragma XMEM default for TNS C compilers, specifies a 32 bit model. NOXMEM specifies a 16 bit model.
#pragma NOWIDE changes the size of int, long and short to 16 bit. Only valid for #pragma NOXMEM which we don't use.
To call Guardian Procedures you should include
#pragma EXTENSIONS
#include
In a scrape with compatability problems, use the #pragma OLDCALLs. This specifies the pre C00 parameter order for old programs.

Best practices.
Don't use int. use long or short instead.
Put environment specific functions in an #include .
Avoid HP specific, and C extensions to data types if possible.
Use unsigned only for short and long.
Abbreviation Long forms Usage
bool bool * Non Ansi
char char Ansi - 1 byte (8 bits)
short short Ansi - 16 bit integer. Preferred usage.
signed short
short int
signed short int
long long 32 bit integer. Preferred usage.
signed long
long int Don't use this
signed long int Don't use this
int int, signed, signed int 32 bits, 16 bits with nowide. Don't use this. Use short instead.
unsigned short unsigned short 16 bit integer
unsigned short int
unsigned unsigned
unsigned int
unsigned long unsigned long
unsigned long int
unsigned long long unsigned long long Non Ansi. unsigned 64 bit integer.
long long long long 64 bit. Used when decimal numbers are is followed by ll or LL modifier
decimal decimal Non Ansi. Only for programs with #pragma SQL and #include
float float Single precision
float float Single precision
double double double Double precision
long double long double
Data Types
char 1 byte
int 16 bit integer
float single precision
double double precision
short 16 bit integer
long 32 bit integer
signed +/-
unsigned +
*int, *float pointer to int, float
enum enumeration constant
const Unchanging constant
extern Declare an external variable
register Declare a register
static Local variable
void No value
structure Define a structure
typedef x Create a name of a data type
sizeof x Size of an object
sizeof (x) Size of a data type
&var Use the variable at this address
Fri 
07/24/2009 17:48:20
 SAE  .AWAITIOX - C Example
There are 2,201 bugs in this code segment
Fri 
07/24/2009 17:48:20
 jim   (Reply)AWAITIOX - C Example
!From http://docs.hp.com/en/524521-012/524521-012.pdf, Page 157

#include <in.h>
#include <netdb.h>
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>
#include <cextdecs(AWAITIOX, FILE_GETINFO_)>
..
struct sockaddr_in fhost;
int len,rsock;
char buffer [8*1024];
short error, rsock2, rcount;
long tag;
..
error = recvfrom_nw(rsock, buffer, sizeof(buffer), 0,
(struct sockaddr *) &fhost, &len, tag);
if error (!= 0) /* some error checking */
{
printf ("recvfrom_nw failed, error %d\n," errno);
exit (1);
}
rsock2=(short)rsock; /* AWAITIOX/FILE_GETINFO_ expects a short
for socket descriptor */
(void) AWAITIOX (&rsock2,,&rcount,&tag,1l);
(void) FILE_GETINFO_ (rsock2, &error);
if (error != 0)
{
printf ("error from AWAITIOX, error %d\n", errno);
exit (1);
}
error = socket_get_info (rsock, (char*) &fhost, len);
if (error != 0)
{
printf ("socket_get_info failed, error %d\n", errno);
exit(1)
}

C / TAL Comparisons (Using SEND_NW as an example):
C Synopsis, used for data type comparisons
#include <....lost in html conversion>
#include <...lost in html conversion>
error = send_nw (socket, nbuffer_ptr, nbuffer_length, flags,tag);
int error, socket;
char *nbuffer_ptr;
int nbuffer_length, flags;
long tag;

C / TAL Comparisons (Using SEND_NW as an example):
C Synopsis, used for data type comparisons
#include <....lost in html conversion>
#include <...lost in html conversion>
error = send_nw (socket, nbuffer_ptr, nbuffer_length, flags,tag);
int error, socket;
char *nbuffer_ptr;
int nbuffer_length, flags;
long tag;
Tal Synopsis, used for data type comparisons
?NOLIST, SOURCE SOCKDEFT
?NOLIST, SOURCE SOCKPROC
error := send_nw (socket, nbuffer_ptr, nbuffer_length,
flags, tag);
INT(32) error, socket;
STRING .EXT nbuffer_ptr;
INT(32) nbuffer_length,
flags;
INT(32) tag;

Fri 
07/24/2009 08:36:18
 SAE  .Tal
But only 1,022 bugs in this code segment..
Fri 
07/24/2009 08:36:18
 jim   (Reply)Tal
-- This is a comment
! This is a comment
! This is a bracketted comment !
STRING         - 1 bytes integer 0 to 255, EG STRING(2) x; is a 2 byte ascii string
INT            - 2 bytes, 0 to 65,535 or -32,768 to + 32,767. This can also be a string EG: INT twochars := "CH";
INT(32)        - 4 bytes
UNSIGNED(1~15) - n bits, 0 thru (2**n - 1)
UNSIGNED(16)   - 0 to 65,535, or -32,768 to +32,767. This is your standard address
FIXED          - 8 bytes, for FIXED(0) or FIXED(*) the range is -9 kazillion to +9 kazillion
REAL           - 4 bytes, precise to 9 digits
REAL(64)       - 8 bytes, precise to 17 digits

INT(16)   is the same as INT
INT(64)   is the same as FIXED(0)
REAL(32)  is the same as REAL

Examples:
LITERAL double_word = (4 * 8);
INT    (double_word) num; ! num is a INT(32)
INT       x := 4                  ! x is decimal 4
INT       x := %177               ! x is Octal 177
INT       x := %B01010            ! x is Binary 01010
INT       x := %B0000000000000010 ! x is 2;
INT       x := %B1111111111111110 ! x is -2 (using twos compliment);
INT       x := %H1A               ! x is Hex 1A
FIXED(3)  x := 0.642F;            ! x is 642000, the  3 shifts the decimal right
FIXED(-3) x := 642945F;           ! x is 642000, the -3 shifts the decimal left
FIXED(*)  x := 123                ! x is stored, not scaled

BLOCK  x                       ; ! Declare Global Variables
     INT        flag    := TRUE;
     INT(32)    index   := 22  ;
END BLOCK                      ;
BLOCK PRIVATE                  ; ! Declare Local Variables
     INT        myflag  := TRUE;
     INT(32)    myindex := 22  ;
END BLOCK                      ;

PROC paragraph_x   ; FORWARD   ; ! Declares that paragraph_x will be out of compile sequence
PROC called_program; EXTERNAL  ; ! Declares that a paragraph can be found in a called program
PROC paragraph_x (param)       ;
BEGIN
     INT param;
END;

PROC paragraphs_nested (param) ;
BEGIN
  ENTRY entry_point              ; ! Declares a programs entry point
  some code
  SUBPROC entry_subroutine(x)    ; ! Declares a subroutine with a PROC
     BEGIN
     some code  
     END;

  entry_point:
     some more code

END;

PROC myproc;
BEGIN !Local data declarations
   SUBPROC some_sub (param); !Declare subprocedure 
      INT param; 
      ENTRY sub_entry;         ! Declare entry-point identifier
      INT var;                 ! Some code here 
   sub_entry:                  ! Apply entry-point
      var := var - param;      ! identifier to statement 
      some code         ;      ! Tal can get ugly very quickly
   END;                        ! End subprocedure 
   some code 
   !Local statements
   CALL sub_entry (1); !Call entry-point SUB_ENTRY 
   END;

PROC xx(v1,v2,v3);
BEGIN...END;
...CALL xx(v1, !nothing!, v3) ! Comments help document ommited variables

DEFINETOG omit                !
some code
?IF omit
some code
?ENDIF omit

Sample compile statement: suppress octal code after each line, suppress all but header information, compile for syntax only
   and puts the errors in a file called xxx, and sets the omit toggle on
TAL/in myprogram/;nocode, suppress, syntax, errorfile xxx,settog omit,

Operators:
  x  := 2     ! move 2 to a number
  x ':=' 'AB' ! move characters to a string
  x := @var   ! x is the address of var
  .x          ! convert x from a INT to the word address of another variable
  <<          ! Signed Left shift
  '<<'        ! Unsigned Left shift
  + - *       ! Signed operators for add, subtract and multiply
  '+' '-' '*' ! Unsigned operators for add, subtract and multiply
  = <= >=     ! comparisons
  '=' '<='    ! comparisons (unsigned)
  <>          ! Not equal

According to the manual, you can do math on a string variable. EG: STRING x; x ':=' 'A"; x := x * 2; Go figure?


Tue 
07/21/2009 20:11:06
 jim  WestView, Pa - DPietros
Mon 
07/20/2009 18:08:29
 jim  The Flame BBQ
Mon 
07/20/2009 07:17:22
 jim  A week of Goodbyes
It was nice hanging with you guys.
Goodbye for now: Jeff, Jennifer and Glen.
We took Jennifer to the airport.
She went to Vegas and we went to the Moon Township. We never got a good chance to take her to Mars.  (I'm serious)
While at the airport, Jen got into a little bit of trouble. It was her first time flying alone. She misplaced her ticket and her birth certificate down some place.
A nice couple saw that she was in trouble and offered their help.
In the end, the security office had her documents, and Jennifer and the couple flew off too Vegas.
The couple was from...you guessed it, Pittsburgh.
Pittsburgh people are the best!
Sat 
07/18/2009 16:14:15
 jim  Coraopolis, Pa
Sat 
07/18/2009 10:45:24
 jim  During Jens Last Day
Fri 
07/17/2009 20:34:21
 jim  Homestead Square at Night
Fri 
07/17/2009 20:33:31
 jim  Homestead - Jen, Becky

Happy Feet!
Fri 
07/17/2009 16:35:51
 jim  A Cool Goodbye
I was standing outside, talking to my buddy as he loaded up his car with the last of his belongings from his cubical.
We shared a smoke, and I watched him drive off for the last time.
Standing alone, I felt a cold breeze at my back.
In less than five minutes, the sky turned into an orchestra of thunder and lightening. The streets flowed with mud.
When I left work soon afterwards, it was still pouring outside.
I looked at the parking lot and I realized that out of the hundreds of people I work with, I was the last person to leave. 
I have five weeks and three days left on my contract. This past year has been full of magic.
Thu 
07/16/2009 18:16:39
 jim  Cabana Bar - Jeffs Going Away Party
Bon Voyage, Jeffrey We celebrated Jeff's goodbye party at the Cabana Bar (lots of fun). The Cabana Club has a thatch covered bar in an outdoors setting with sand, lots of tables, fire pits, and a water fall. After two drinks, we wanted something to eat. If you want food at the Cabana Bar, you have to order take out from the restaurant, and bring it down. That seems odd, since it is right next to the restaurant. County codes make businesses do some very odd things. So our next stop was Walnut Grove. The party broke up probably around 7 pm. It sure is nice having friends. It's been a fun year with you buddy! We celebrated at the Cabana Bar then went to Walnut Grove. These guys are the greatest!
Tue 
07/14/2009 21:49:45
 jim  Robinson Cracker Barrel - Becky, Jen
I stepped out, bought some shirts and a jacket, had them gift wrapped, then brought to the table - Just Because
Tue 
07/14/2009 06:50:55
 jim  So Sad to Say Goodbye
A fellow contractor got the axe yesterday. I'm going to miss him a lot.
It's pretty common for us contractors to come and go.
It can happen at any time and as a general rule it should be expected.
For me, contracting makes the most efficient use of the time we have here; if there's work, I work. If there is nothing to do, I play.
It's not like my fellow contractor did anything wrong. It's always difficult to say goodbye. But we'll bump into each other again.
We picked a high paying profession.
We knew we'd be travelling a lot. We knew we'd be changing contracts every year. There's always the chance that when we come in, all of the security codes will be changed, and we'll be out of work.
We knew we'd be giving up our rights of employment and we signed them away.
While the road, I've lost loved ones, forgotten what it is like to have a home, and I can't say for sure who I've become. Last year I lost my fortune.
I could never do this alone.
To contract nationally, you have to give up a normal livestyle.
It's an exchange. You trade familiarity for a broad spectrum of knowledge and experience.
And I've got to say, I've met some GREAT People along the way.
Mon 
07/13/2009 20:26:02
 jim  West View - Football Fields
Sat 
07/11/2009 19:42:04
 jim  Splashes of Kennywood
Sat 
07/11/2009 19:18:24
 jim  Kennywood-Fountains
Sat 
07/11/2009 17:47:46
 jim  Kennywood-Becky,Jen
Sat 
07/11/2009 17:33:48
 jim  Kennywood-Views
Sat 
07/11/2009 15:35:13
 jim  Kennywood-Rides
Sat 
07/11/2009 15:32:32
 jim  Kennywood-SkyTram
Sat 
07/11/2009 08:04:12
 jim  Wexford Apt Critters
Fri 
07/10/2009 20:55:53
 jim  New Castle - China Buffet
Fri 
07/10/2009 20:30:34
 jim  New Castle - SummerFest
Fri 
07/10/2009 20:24:54
 jim  New Castle, Pa
Fri 
07/10/2009 18:59:06
 jim  Boating in Moraine State Park
Fri 
07/10/2009 18:47:22
 jim  Moraine State Park - Lake and Sky
Fri 
07/10/2009 18:04:18
 jim  Moraine State Park - Jen, Becky
Fri 
07/10/2009 18:03:38
 jim  Moraine State Park - Beach
Thu 
07/09/2009 12:51:12
 jim  Somewhere in Pa
My Cubical Area - To some it may sound strange to actually enjoy their job, but me, I love mine. There is a feel of comradery here. There is humor, excitement, and a feeling of importance I get when I'm working in my cube.
Contractors generally don't get much attention on the job. We usually sit, read, code, test and document. Our contacts exist in the form of emails, instant messages, and word documents. But this contract is so very different. I actually understand most of the system at this point. That is because, to the people, I'm not just a body, I am a real, live person. And these people, no matter how far they get promoted, they know the system's nuts and bolts.
Today, an analyst pulled up a program by its number, moved through the code, and called it up by its server name (not so cryptic). There are over a thousand programs in the system I work with, and he had this one memorized. Many of those who worked on this system have been promoted levels beyond programming.
I will miss this place and these times.
From Becky, Jennifer and myself, I'd like to express a special appreciation to Jeff, Lonnie, Georgia, Cynthia, Cindy, Arden, Rob, Scott, Dave, the people at Ericsson, and all of the people that we've met in Pennsylvannia so far. Pennsylvannia is beautiful by itself. Add you guys to it, and it is my heaven. Too bad it all has to end.
Wed 
07/08/2009 16:19:04
 jim  Soergel Orchards
Mon 
07/06/2009 09:47:26
 jim  Apt Critters
Sun 
07/05/2009 16:34:06
 jim  Pittsburgh Cemetary
Sun 
07/05/2009 15:14:27
 jim  Jim, Becky and Jennifer
Sun 
07/05/2009 13:46:28
 jim  Shadyside, Pa
Sat 
07/04/2009 21:38:36
 jim  State Pt Park - Fireworks
Sat 
07/04/2009 20:27:19
 jim  State Pt Park - Three Dog Night
Sat 
07/04/2009 18:45:36
 jim  Boat Races
Fri 
07/03/2009 20:26:22
 jim  State Point Park - Becky, Jennifer
Fri 
07/03/2009 19:48:46
 jim  Forbes, Pa
Fri 
07/03/2009 19:47:08
 jim  Pittsburgh, Pa - Bldgs
Wed 
07/01/2009 20:12:22
 jim  Vestal Park
Wed 
07/01/2009 06:51:54
 jim  Number, Numbers, Numbers!
Click here to read more: Pittsburgh dips to 60th in population among U.S. cities
Is it just me, or does this sound INSANE! I've been all over this country, and no way is Pittsburgh #60. If they'd quit using the boundaries drawn by whomever/whenever, and start using a circular reference from the city's center, these statistics would change immensely.
The way the census is run today, the population of Pittsburgh could easily double in one day based on the decisions In a Meeting! Don't believe me...check out the population of Louisville over the years, at a time when people are moving away!
Statistics people...don't trust them.
Half of the people quoting statistics state half of the facts, which is twice as many as those who don't.
Oscar Wilde - "The pure and simple truth is rarely pure and never simple."
Mark Twain - "First get your facts; then you can distort them at your leisure."
Benjamin Disraeli - "There are three kinds of lies: lies, damn lies, and statistics."
Bill Gates - "Then there was the man who drowned crossing a stream with an average depth of six inches".
"There is sanity in knowing you are insane."
"The four most important things you should learn in life are:
Learn to listen, pay attention, and to count".

<< 07/2008 < 07/2009 Calendar 08/2009 > 07/2010 >>Sign InView Other Logs