Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Can somebody explain use of VARCHAR in C program

Can somebody explain use of VARCHAR in C program

From: <ramdan_at_mailexcite.com>
Date: 1997/08/05
Message-ID: <870810342.32372@dejanews.com>#1/1

Can somebody please give an explanation of VARCHAR in C programs.

i am reading an input file that is of fixed lengt. Several records are of fixed lenght and have spaces. I read that by using the VARCHAR you can avoid having to use a function to elimate white space.

But VARCHAR is not a C reserved word. How is it used. An exapmle follows

  int emp_number;
  char temp[20];
  VARCHAR emp_name[20];
  /* get values for input host variables */   printf("Employee number? ");
  gets(temp);
  emp_number = atoi(temp);
  printf("Employee name? ");
  gets(emp_name.arr);
  emp_name.len = strlen(emp_name.arr);

How does the last line fit in with use of the VARCHAR? Is it needed for its use?

-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet
Received on Tue Aug 05 1997 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US