Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
HP.com home

HP OpenVMS Systems

ask the wizard
Content starts here

BASIC and TCP/IP Programming?

» close window

The Question is:

 
Recently I was given the task to write some TCP/IP interface code using
 DEC-BASIC (don't ask why!).
I started converting some DEC-C examples that Compaq had provided in directory
 "TCPIP$EXAMPLES" and discovered two programs which compile but do not run.
 
They are:
 TCPIP$EXAMPLES:TCPIP$TCP_SERVER_QIO.TXT
 TCPIP$EXAMPLES:TCPIP$TCP_CLIENT_QIO.TXT
 
The following stub needs to replace code at:
 line 129 in TCPIP$TCP_SERVER_QIO.TXT
 line 109 in TCPIP$TCP_CLIENT_QIO.TXT
 
//--------------------
// struct  dsc$descriptor inet_dev =
// {10, DSC$K_CLASS_S, DSC$K_DTYPE_T, "TCPIP$DEVICE"};
   /* original (broken) code */
//--------------------
// struct  dsc$descriptor inet_dev =
// {12, DSC$K_CLASS_S, DSC$K_DTYPE_T, "TCPIP$DEVICE"};
   /* fixed code */
//--------------------
   $DESCRIPTOR(  inet_dev, "TCPIP$DEVICE:"  );
   /* better fixed code */
//--------------------
 
Neil Rieck
Bell-ICS, Bell Canada,
Kitchener, Ontario.
email: neil.rieck@bell.ca
 
 


The Answer is :

Hmmm...
	 F$LENGTH("TCPIP$DEVICE") - F$LENGTH("UCX$DEVICE") = 2
 
 :-)
 

answer written or last revised on ( 25-NOV-2000 )

» close window

 

** About PDF files: The PDF files on this Web site can be read online or printed using Adobe® Acrobat® Reader. If you do not have this software installed on your system, you may download it from Adobe's Web site
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2008 Hewlett-Packard Development Company, L.P.