Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Jun 2000 18:07:25 EDT
From:      "gerald stoller" <gerald_stoller@hotmail.com>
To:        freebsd-hackers@FreeBSD.ORG
Subject:   Passing values between shell-variables
Message-ID:  <20000622220725.30429.qmail@hotmail.com>

next in thread | raw e-mail | index | archive | help
     I want to take an integer value from one shell-variable and pass a 
modified value to another shell-variable.  First I tried  setint_v  (after 
using  local  to get  tbl  structures for the two shell-variables) and 
second I tried various forms of the  var.c  functions  intval  &  setint .  
To see if things worked, I print the shell-variable (to which I assigned a 
value) afterwards, but neither path seems to have succeeded.  I may try  
getint  next, and also make my tests more basic, but if anyone could give me 
a good hint, I'd appreciate it.
    One thing that puzzles me is can be illustrated by the following code:
          struct  tbl  *var1 ;
          int   val1  ;

          var1 = local( "LINENO" , FALSE )  ;
          getint( var1 , &val1 )  ;
          printf( "%d  %d\n"  ,  var1->val.i  ,  val1  )  ;
which gives differing values in the two fields (the  val1  value appears to 
be correct).  Isn't  val.i  (from struct  tbl ) where the integer (or is it 
floating point?, but it is declared  long ) is stored?
     Please send a response directly to me, my bulk-mail folder is 
over-stuffed.
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000622220725.30429.qmail>