适合编程的字体里这是什么字体?

下次自动登录
现在的位置:
& 综合 & 正文
十大编程字体
Borland C++“浮点格式未链接”错误的官方解释
by wecan in
at 日13:35星期二
文章:“浮点格式未链接”消息
翻译:()
类型:普通
操作系统:所有
产品:所有
问题描述:
此文档将解释程序错误“浮点格式未链接:异常程序中止()”产生的原因,并指引你如何解决此问题。除非有特别说明,这个问题及相应的解决方法适用于所有版本的、、。
什么是浮点格式?
浮点格式是一个格式化信息的集合,该集合使得一些运行时库函数()可以操作浮点数,比如和。
该问题何时会被修复?
我们并没有计划修复此问题,因为这并不是一个。编译器的原意是在不需要的时候不链接浮点格式,以节约内存。作为交换,程序员必须明确地在那些隐晦地操作浮点数的程序中说明自己的需要。
我该如何去除该错误消息?
因为有多种可能均可引发该问题,检查下列每个潜在的原因并找到解决该问题的方法。以下列出最普遍的引发该问题的原因:
原因:将浮点选项设为。要操作浮点数,必须将编译器的浮点选项设为或。解决方法:将浮点选项设为或。在集成开发环境()中,这个选项可能在或者中,这与你所使用的编译器有关。如果使用的是命令行编译器,请使用合适的开关。
原因:执行时,库的顺序错误(在之前列出时将导致此问题。)解决方法:这个错误通常发生在使用命令行编译器,并将和()分开执行时发生。当执行时,将库的顺序改变为:用户库(在中括号中的库是可选的。)注:在《》一书的第页存在一处印刷错误,其中的命令行中列出的库顺序有误。那个错误的顺序正会导致浮点格式未链接。
原因:可能是编译器过度优化了程序,或你的程序操作浮点数时十分有限,并且采用了特殊的方式。在一些隐蔽的场合,编译器会忽略中使用的浮点数(例如,试图读取结构体()中浮点型数组的一个元素时)。解决方法:如果你使用的是或以后的版本,请阅读部分。如果使用的是、或任何版本的编译器,请阅读部分。(译者注:此处与原文不同,原文认为任何版本的都必须使用部分述及的方法,但实际上及以后的版本可以使用部分的方法解决该问题。)部分(或以后的版本):在某一源代码模块中加入:extern _
#pragma extref _floatconvert
在的和文档中,不正确地指出只需在源码中加入#pragma extref _floatconvert
来解决错误。如果你不加入“”这一行,你会得到“未定义符号。()”错误。如果你将两行代码的顺序颠倒,也会得到同样的错误消息。请注意“”一行的末尾没有分号。如果你加上了分号,将得到“错误的指示语法()”错误。在的文档中指出下面的方法:extern void _floatconvert();
#pragma extref _floatconvert
也可以解决问题。事实上,是一个变量抑或函数无关紧要,只要链接器可以识别该符号即可。在的文档中,已经改正了需要加入的这两行代码的错误。部分(或):加入源码模块中下面的函数。你不用调用此函数,只需将其包含在某个源码模块中。static void force_fpf()
float x, *y; /* Just declares two variables */
/* Forces linkage of FP formats */
/* Suppress warning message about x */
(译者注:代码中注释的意义为:定义两个变量,强制使用浮点格式链接,使用变量以防止产生警告信息。)
原因:在使用时忘记在变量表达式前加取址符“”。例如:
scanf("%f", foo);解决方法:修改代码,在需要的地方加上取址符“”。例如,上面的代码应改为:
scanf("%f", foo);
原因:在使用时存在一个。解决方法:获取并安装中的补丁。这个文件可以在()中的部分下载到。
原因:在使用和时存在一个。解决方法:获取并安装中的补丁。这个文件可以在()中的部分下载到。
原因:试图在中创建一个应用程序。解决方法:随其提供了一个名为的可执行文件。这个程序可以调用的命令行编译器()和命令行链接器()。因为在和命令行下的链接器有所不同,所以你不能在中创建应用程序,让它们正确运行。如果你试图那样做,就可能得到浮点类型未链接的错误消息。解决的方法就是使用命令行工具,和,而不使用。(译者注:是创建保护模式接口()应用程序的工具,保护模式对应于默认的实模式(),它使得应用程序可以使用更多的内存。在实模式下,应用程序最多只能和分享的基本内存。)
关键字:,
免责声明:你有权在随产品提供的实际许可声明的相关约束下使用此技术信息。
参考及引用:(无)
最后修改:年月日
[附:英文文档原文]
community.borland.com
Article #15204: "Floating point formats not linked" messages.
Technical Information Database
TI204C.txt
"Floating point formats not linked" messages.
:GeneralPlatform
:AllProduct
Description:
This document explains why you might be getting the error
FLOATING PNT FORMATS NOT LINKED : ABNORMAL PROGRAM TERMINATION
and tells you how to resolve it.
The problems and solutions
below apply to ALL versions of Turbo C, Turbo C++, and
C++, except where noted.
What are floating point formats?
Floating point formats are a collection of formatting information
used to manipulate floating point numbers in certain runtime
library functions such as scanf() and atof().
When will this be fixed?
There are no current plans to fix this because it is not a bug.
The intent is to avoid linking the floating point formats (about
1K of overhead) when they are not required.
The tradeoff of this
feature is that the programmer must explicitly request that the
floating point formats to be linked in for some programs which
manipulate floats in a limited and specific fashion.
How do I resolve the error message?
Since you can get the error in a number of different ways, check
the following list of potential causes to find out how to resolve
the error.
These are listed in order of most common to least
common causes.
Floating point set to .
Your have your
floating point option set to None when it should be set to
either Emulation or 80x87.
Set Floating Point to
or &80x87&.
Integrated Development Environment (IDE), this is either
under Options & Compiler & Advanced Code Generation or
Options & Compiler & Code Generation & More, depending upon
which compiler you have.
With the command line compiler, use
the appropriate -f switch.
Misordered libraries when executing TLINK
(Cx.LIB listed before EMU.LIB will cause the error.)
This possibility usually occurs only when you are using
the command line compiler and are explicitly calling TLINK
separately from BCC or TCC.
When executing TLINK, change the
order of the libraries to
[user libs] [GRAPHICS.LIB] EMU.LIB MATHx.LIB Cx.LIB
(libraries in brackets are optional)
There is a misprint in the
C++ Tools &
Utilities Guide on page 58 that displays the wrong order for
libraries on the TLINK command line.
The ordering shown in
the manual is exactly what will cause floating point formats
not linked.
Either the compiler is overoptimizing, or the
floating point formats really do need to be linked in because
your program manipulates floats in a limited and specific
Under certain obscure conditions, the compiler will
ignore floating point usage in scanf().
(e.g., trying to
read into a float variable that is part of an array contained
in a structure.)
If you have
C++ 3.0 or later, read Part A.
C++ 2.0 or any Turbo C or Turbo C++
compiler, read Part B.
This fix is the only fix that will
solve a "PRINTF : Floating point formats not linked" error
message occurring with inline assembly.
Part A (BC++ 3.0 or later):
Add the following to one source module:
#pragma extref _floatconvert
The README and HELPME!.DOC files that shipped with
C++ 3.0 incorrectly say that only
#pragma extref _floatconvert
is required in order to resolve the FPFNL error.
do not include the "extern _" line you will
get the error "Undefined symbol _floatconvert."
also get the same undefined symbol if the "extern
_floatconvert" comes after the #pragma line instead of
Note that the #pragma line does not have a
semicolon at the end of the line.
If you put a semicolon
there, you will get the error "Bad pragma directive
The README that shipped with
C++ 3.1 says that
extern void _floatconvert();
#pragma extref _floatconvert
This should work, as well.
It doesn't really matter
whether _floatconvert is a va it
only matters that it is some symbol that the linker will
recognize.
The HELPME!.DOC for BC++ 3.1 has the correct two lines to
Part B (BC++ 2.0 or TC or TC++):
Add the following force_fpf() function to one source
It is not necessary t just
include it in one of your modules.
static void force_fpf()
float x, *y; /* Just declares two variables */
/* Forces linkage of FP formats */
/* Suppress warning message about x */
Forgetting to put the address operator & on the scanf
variable expression.
For example,
scanf("%f", foo);
Change the code so that the & operator is used where it
is needed.
For example, the above code should be
scanf("%f", &foo);
A bug in Turbo C 2.0 when using scanf()
Obtain and apply the patches in TC2PAT.ARC.
can be downloaded from the Languages / C++ / Patches section
on DLBBS (408-439-9096).
A bug in Turbo C 2.01 when using atof() or strtod()
Obtain and apply the patches in TC21PT.ARC.
can be downloaded from the Languages / C++ / Patches section
on DLBBS (408-439-9096).
You are trying to create a Phar Lap DOS Extender
application with the Integrated Development Environment
Phar Lap includes an executable called BCC286.EXE with
their DOS Extender.
This program calls 's command-
line compiler (BCC) and command-line linker (TLINK).
the linker in the IDE is different than the linker at the
command line, you cannot create Phar Lap DOS Extender
applications in the IDE and expect them to run properly.
you try to do so, you might get a floating point formats not
linked error message.
The fix is to use the command line
tools, BCC and TLINK, instead of the IDE.
FPFNL , APT
DISCLAIMER: You have the right to use this technical information
subject to the terms of the No-Nonsense License Statement that
you received with the
product to which this information
Reference:
7/2/98 10:39:05 AM Last Modified: 01-SEP-99
请不要吝惜您的评论,每一条评论,都是我在漫漫长夜前行的力量...
【上篇】【下篇】已解决问题
如果有一种程序语言是基于中文的话,那目前最适合做这种语言的中文编程字体是什么?
提问时间: 18:26:29
浏览次数:8187
该答案已经被保护
说一些比较低端的事情吧。 03年我学C#的时候,发现一个好玩的东西,可以用很复杂的字符当变量名,比如说,一般的语言写圆周率,都是写一个pi,但是在C#里面可以直接打一个&,除此之外,用中文也可以。 后来到04年,我听人说,他在一个使用.net的小软件公司,公司要求员工使用中文当类名,变量名,方法名,他很不开心,觉得非常2,我也这么觉得。 我们说中文编程,并不是指要很变态地把操作符之类底层的东西都汉化,而是只限于变量名,那么,你就有可能看到这样的代码: 定单 一个定单 = 定单工厂.创建定单(参数); 一个定单.校验(); 一个定单.提交(); 尽管输入的时候有些别扭,但这个至少不会有人看不懂了&&而且,如果是C#那么好的东西,借助强大的VS,一个点出来,后面列出一堆中文方法和变量名,对这个群体的生产力提升还是有帮助的。
答案创立者
以企业身份回答&
快速解决你的电商难题
店铺优化排查提升2倍流量
擅长&nbsp 店铺优化
您可能有同感的问题编程用哪种格式的字体最好?_百度知道
编程用哪种格式的字体最好?
Courier new应该不错吧?看到很多书里的代码用的是这种格式。
我有更好的答案
其实代码最后都是纯文本,没有格式的。Courier New是等宽字体,每个字符一样宽,比较容易看出代码的对齐和缩进。
采纳率:48%
这个有很大关系吗?最重要代码自己能看懂,别人能看懂就行了,我觉得字体是浮云
本回答被网友采纳
其实编译器里的默认字体就是最好的,Courier new也很不错,它很容易让人习惯,而且易混字符也能清晰辨认
一种字体用习惯就okay了
我比较喜欢用Manoco,你可以试试,不错的。
你去书城或者是新华书店买本JAVA入门经典咯!这上面对初学JAVA的类的各种解释很详细,本且对关键字以及语法也解释的很精辟.推荐初学JAVA的人好好参考!
其他3条回答
为您推荐:
其他类似问题
您可能关注的内容
字体的相关知识
换一换
回答问题,赢新手礼包
个人、企业类
违法有害信息,请在下方选择后提交
色情、暴力
我们会通过消息、邮箱等方式尽快将举报结果通知您。有哪些适合用于写代码的西文字体? - 知乎<strong class="NumberBoard-itemValue" title="被浏览<strong class="NumberBoard-itemValue" title="4,570分享邀请回答1169 条评论分享收藏感谢收起6917 条评论分享收藏感谢收起老师编程用的字体是什么字体?
老师编程用的字体是什么字体?
写下你的评论...
Copyright (C) 2018 imooc.com All Rights Reserved | 京ICP备 号-11}

我要回帖

更多关于 编程用什么字体 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信