问题标签 [pascal]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
4 回答
7079 浏览

sockets - Pascal 中的套接字

你如何在 Pascal 中使用网络套接字?

0 投票
1 回答
557 浏览

resources - 在哪里可以找到有关 VectorScript 编程语言的资源?

哪里可以了解更多关于 VectorScript(NNA VectorWorks CAD 应用程序中内置的类似 Pascal 的编程语言)来创建自定义“插件”对象和工具的信息?

0 投票
9 回答
10998 浏览

delphi - 在 Delphi 中解析一行的最快方法是什么?

我有一个巨大的文件,我必须逐行解析。速度至关重要。

一行示例:

调用 GetToken,返回“Here-is-the-Next-Token”并将 CurrentPosition 设置为令牌最后一个字符的位置,以便为下一次调用 GetToken 做好准备。标记由一个或多个空格分隔。

假设文件已经在内存中的 StringList 中。它很容易放入内存中,比如 200 MB。

我只担心解析的执行时间。什么代码将在 Delphi (Pascal) 中产生绝对最快的执行速度?

0 投票
3 回答
1196 浏览

c++ - 帕斯卡风格铁路图

在哪里可以找到描述 C++ 语法的帕斯卡风格铁路图?(作为 EBNF 的替代品)

0 投票
5 回答
668 浏览

language-agnostic - 什么会更有成效?将 VAX PASCAL 转换为 GNU PASCAL 或将其移植到 perl 或其他语言

我有这个遗留代码库(Compaq PERL),大约 1500 行代码,我需要移植到 Windows。我想使用gnu PASCAL(我已经安装并且可以使用)。我已经将我们的汇编程序(HP 64000 8051)从 VAX 上移到了Windows(KEIL 8051)上。

软件工程总监希望所有产品都脱离 VAX。这是问题所在,我尝试使用gpc从 CYGWIN 上的 VAX编译PASCAL。似乎需要做很多事情才能从一个 PASCAL 到另一个获得(IO 和算法)等效性。

我非常了解 PERL、FORTRAN、C 和 C++(还有 JAVA,但我宁愿不)。我的问题归结为 1500 行代码,将 PASCAL 代码移植到另一个 PASCAL 会更有效率,还是将其移植到另一种语言会更有效率?VAX PASCAL 是我在大学时的第一语言,但我已经有 8 年没有主动使用它进行编程了。我经常和专业地使用 PERL、C、C++ 和 FORTRAN。

我会说,就我的选择而言,如果我要转换成另一种语言,那就是 PERL。

代码所做的是对 INTEL hex 和 TEX HEX 图像文件执行填充和校验和。我知道 Srec 1.4 程序可以工作,但这不是一个选择,因为我必须让我的代码符合 DO-178B 的要求(而且我的公司对使用开源代码持谨慎态度)(他们对 open 没有问题源工具;只是代码)。

0 投票
2 回答
402 浏览

delphi - Delphi(2006) 循环帮助

所以我基本上想要做的是让某件事在 70% 的时间发生,另外一些事情在每件事的 10% 的时间发生,如果这是有道理的,但我的应用程序似乎没有执行我猜测的任何操作我误解了循环语法或其他东西,无论如何,如果有人可以看一下,也许会给我一些建议

0 投票
1 回答
915 浏览

delphi - TextMate 的 Delphi 语法

我与RefactorMyCode.com的 Marc-André Cournoyer 交换了关于在他的网站上支持 Delphi 的电子邮件。由于他的站点使用Ruby 的 UltraViolet进行语法高亮显示,并且它使用TextMate语法,因此他需要 TextMate 的 Delphi 语法。事实证明它已经有了Pascal 语法,所以它已经完成了 90%。

有谁知道我在哪里可以找到已经为 Delphi 更新的软件?Delphi Prism / Oxygene 也很棒!

0 投票
2 回答
921 浏览

mips - Pascal 到 Mips 代码转换

我目前正在为我的 Pascal Parser (Written in C using Lex / Yacc) 开发 Mips 代码生成器。有没有人知道我可以用作参考以确保正确的代码生成的工具?

0 投票
6 回答
585 浏览

delphi - Is possible to include files (linking) based on a component property?

Delphi 2007/2009 odd question here:

It's possible, based on a component property defined in design-time, to include files in linking or leave them ?

Example: If I leave SomeProperty true, when compiling, the unit SomeUnit will be included into my project. Otherwise it will not be included.

My second approach to this problem is to deploy a second component, which when dropped in the form (or not) will include the unit in uses clause. But if it can be done with a property, that'll be better.

I want to avoid conditional compilation via IFDEF because that forces the component to be built every time the projects are built. Or not?

I am trying to achieve an easy way of including some units in project, and then those units will provide support for specific databases. Having these into an option, at the connection component, will be ideally easy: Check support and that's done. Uncheck, and get some less KBs in your compiled APP.

edit: I'll stay with the component way for instance. I knew the IFDEF method and things, but that forces the component to be built everytime the projects are built. Or not?

I was trying to achieve an easy way of including some units in project, and then that units will provide support for specific databases. Having these into an option, at the connection component, will be ideally easy: Check support and that's done. Uncheck, and get some less KBs in your compiled APP.

0 投票
4 回答
3246 浏览

visual-studio - Visual Studio 中的 Pascal 语法高亮显示?

我正在用 C# 编写最初用 Delphi 编写的下一代旧应用程序。我经常不得不查看旧代码并想知道是否有在 Visual Studio 2008 编辑器中安装 Pascal 语法突出显示的方法。

TIA。