Got something to write about? Check out our Article Builder.

View \BASIC2.BAS

Convert Basic numeric values to C and visa versa, C source

Submitted By: WEBMASTER
Rating: (Not rated) (Rate It)


100 '**********************************************************************
110 '   BASIC2.BAS -- read and print the contents of "BASIC.OUT"
120 '**********************************************************************
130 '
140 ' Open and define the fields of the input file
150 '
160 OPEN "R", 1, "BASIC.OUT",34
170 FIELD 1, 2 AS n1$, 20 AS n2$, 4 AS n3$, 8 AS n4$
180 '
190 ' print the values
200 '
210 FOR i=1 TO 5
220     GET 1
230     j  = CVI(n1$)
240     k$ = n2$
250     l! = CVS(n3$)
260     m# = CVD(n4$)
270     PRINT j,k$,l!,m#
280 NEXT i
290 CLOSE 1
300 END

corner
© 1996-2008 CommunityHeaven LLC. All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
North American business development: Nicolai Wadstrom. Publisher: Lars Hagelin.