OpenVMS Source Code Demos

mysql_demo11

1000	declare string constant k_program = "MYSQL_DEMO11.BAS"
	!=========================================================================================
	! title  : MYSQL_DEMO11.bas
	! author : Neil Rieck ( https://neilrieck.net MAILTO:[email protected] )
	!        : Waterloo, Ontario, Canada.
	! created: 2017-05-26
	! os     : OpenVMS-8.4 (Itanium2)
	! notes  : This program doesn't return string data from C back to BASIC but it could with
	!	   a little work. See program "MYSQL_DEMO12.bas" for a version that does.
	! ver who when   what
	! --- --- ------ -------------------------------------------------------------------------
	!  11 NSR 170526 1. original effort
	!=========================================================================================
	option type=explicit							! no kid stuff
	!
	external long function NSR_CONNECTOR(long by ref, long by ref, long by ref)
	!
	declare long	rc	,&
			test	,&
			x	,&
			y	,&
			addr
	!=======================================================================
	!	main
	!=======================================================================
	main:
	print "-i-program: "; k_program						!
	rc = 0									!
	!
	print "-i-BASIC calling C =============================="
	test = NSR_CONNECTOR(x, y, addr)					! magic happens here :-)
	print "-i-now back in BASIC ============================"
	print "-i-x   :";x;" (fields per row)"
	print "-i-y   :";y;" (row count)"
	print "-i-addr:";addr
	!
32000	fini:
	print "-i-exiting BASIC ================================"
	end

Back to Home
Neil Rieck
Waterloo, Ontario, Canada.