登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
编译环境:win7-64位+vs2008+ivf 11.0+imsl6.0
新装了IMSL 函数库 可是应用函数库中的输出矩阵子程序时总是运行不出结果(其他函数基本都能运行)。 还请各位高手帮忙看下! program fnl ! Include the necessary header file: ! For the dynamic library: INCLUDE 'link_fnl_shared.h' ! For the static library: !INCLUDE 'link_fnl_static.h' !!DEC$ OBJCOMMENT lib:"libguide.lib" ! Declare which IMSL functions will be used USE LSARG_INT USE WRRRN_INT ! Declare variables PARAMETER (LDA=3, N=3) REAL A(LDA,LDA), B(N), X(N) ! Set values for A and B ! A = (33.0 16.0 72.0) ! (-24.0 -10.0 -57.0) ! (18.0 -11.0 7.0) ! B = (129.0 -96.0 8.5) DATA A/33.0, -24.0, 18.0, 16.0, -10.0, -11.0, 72.0, -57.0, 7.0/ DATA B/129.0, -96.0, 8.5/ ! The main IMSL function call to solve for x in Ax=B. ! This is the floating point version, to use double-precision, call DLSARG. CALL LSARG(A,B,X) ! Now print the solution x using WRRRN, a printing utility CALL WRRRN('X',X,1,N,1) END PROGRAM fnl 在编译生成时没有提示错误,提示 生成成功! 但是当调试(ctrl+f5)时便不出结果如下所示:
输出屏变灰色。
改用WRITE 输出X 能够输出结果。不知道为什么WRRRN等输出函数不能使用。请各位大神帮忙啊!
|