天道酬勤,学无止境

4gl

Add a new language to Visual Studio 2010 with syntax highlighting and intellisense

I am trying to add support for a different language in Visual Studio 2010. I was hoping to add custom syntax highlighting, and have some sort of basic intellisense work with it. The language I am trying to add is 4Js Genero (a newer version of Informix-4GL). I basically just need support for the .4gl and .per file extensions that are used in Genero/4GL. Does anyone know how to do this, or can point me in the right direction?

2021-11-28 10:56:39    分类:问答    visual-studio-2010   syntax-highlighting   intellisense   informix   4gl

如何将 A0058 值转换为 9958 进行中 4gl [重复](How to convert A0058 value to 9958 in progress 4gl [duplicate])

问题 这个问题在这里已经有了答案: 如何将 A00073 值转换为 9973 in progress 4gl (5 个回答) 4年前关闭。 我有具有多个值的列,例如 A0045 ,A00065 。 我想将它转换为 9945、9965。需要删除所有 0 和字符值并在该值之前添加 99..replace(val,"A","99") 将只替换 AI 想要去 AZ 出现.. 任何字符应该被转换..请帮忙 回答1 怎么样 newValue = "99" + LEFT-TRIM( oldValue, "ABCDEFGHIJKLMNOPQRSTUVWXYZ0" ). 这应该从字符串中获取所有前导字母和零字符,并以99前缀。 回答2 /************Try this*********************/ define variable word as character no-undo. define variable i as integer no-undo. assign word = "A00065". /******to remove all the zeroes**************/ word = replace(word,substring(word,index(word,"0"),(r-index(word,"0") - 1)),""). do i = 65

2021-11-14 11:58:32    分类:技术分享    openedge   progress-4gl   4gl

How to convert A0058 value to 9958 in progress 4gl [duplicate]

This question already has answers here: How to convert A00073 value to 9973 in progress 4gl (5 answers) Closed 4 years ago. i have column having multiple value like A0045 ,A00065 . i want to convert it 9945, 9965. Need to remove all 0 and character value and add 99 before that value.. replace(val,"A","99") will replace only A I want to go for A-Z occurrence.. Any char should be convert .. Please help

2021-11-10 11:16:56    分类:问答    openedge   progress-4gl   4gl

将 4GL 窗口定位在中心(Positioning a 4GL window in center)

问题 我的 4gl 程序中有多个窗口,我必须将它们定位到屏幕的中心。 例如: OPEN WINDOW w_yesno AT 10, 10 WITH 4 ROWS, 56 COLUMNS ATTRIBUTE (BORDER, MESSAGE LINE FIRST+1, PROMPT LINE FIRST+2) 是否有任何关键字可以用来在中心自动打开它? 就像是: OPEN WINDOW w_yesno AT CENTER 回答1 不,没有使窗口居中的关键字解决方案。 您可以使用头寸变量并进行计算,也可以先验计算并使用硬编码头寸,如您所示。 如果您的窗口大小不是 24x80,计算可能会更好。 在遥远的过去,我写了一些代码,其中屏幕下方有可变数量的窗口,其中一些有 2 行,一些有 3 行,一些有 4 行; 然后你必须用计算来定位它们。 回答2 我通过调用以下函数,传入字符串和列数,设法使字符串居中。 FUNCTION center_string(str, cols) DEFINE str CHAR(100), cols, len, spcs SMALLINT LET len = length(str) LET spcs = (cols - len) / 2 IF len >= cols THEN # Do nothing. Don't have enough columns to

2021-10-23 07:18:34    分类:技术分享    window   informix   centering   4gl

Positioning a 4GL window in center

I'm having multiple windows throughout my 4gl program where I have to position to the center of the screen. For example: OPEN WINDOW w_yesno AT 10, 10 WITH 4 ROWS, 56 COLUMNS ATTRIBUTE (BORDER, MESSAGE LINE FIRST+1, PROMPT LINE FIRST+2) Is there any keyword I can use to automatically open it in the center? Something like: OPEN WINDOW w_yesno AT CENTER

2021-10-23 05:23:56    分类:问答    window   informix   centering   4gl

如何将 A00073 值转换为 9973 进行中 4gl(How to convert A00073 value to 9973 in progress 4gl)

问题 我有具有多个值的列,例如 A0045 ,A00065 。 我想将其转换为 9945、9965。需要删除所有 0 和字符值并在该值之前添加 99.. 请帮助.. 回答1 这可以通过多种方式完成。 这是一种方法(可能不是最好的)。 由于我没有数据库,我创建了一个临时表。 def temp-table tt field val as char. create tt. tt.val = "A0045". create tt. tt.val = "A00065". for each tt: run filter_zero(input-output val). val = replace(val,"A","99"). DISP val. end. procedure filter_zero: define input-output parameter val as character. // remvoe all zeroes repeat while val matches("*0*"): val = replace(val,"0",""). end. end procedure. 回答2 下面的代码删除了大写 (AZ) 和小写字母 (az) 以及“0”: DEF TEMP-TABLE test FIELD str1 AS CHAR. DEF VAR newStr AS CHAR NO

2021-10-19 18:45:03    分类:技术分享    openedge   progress-4gl   4gl

Informix 4GL 中的类型转换(Type Conversion in Informix 4GL)

问题 我想类型的变量转换VARCHAR到INTEGER ,反之亦然(即从INTEGER类型VARCHAR )Informix中的4GL。 回答1 DEFINE v VARCHAR(20) DEFINE i INTEGER LET v = "12345" LET i = v DISPLAY "i = ", i, "; v = ", v LET i = 123456 LET v = i DISPLAY "i = ", i, "; v = ", v 容易吧? 如果字符串无法转换为数字(运行时错误等),则会遇到问题。 本质上,I4GL 会在可能的情况下自动在类型之间进行转换,只有在不可能的情况下才会产生错误。 有些转换是不可能的。 例如,我认为您无法将 DECIMAL 或 INTEGER 转换为 INTERVAL YEAR TO MONTH。

2021-09-10 22:28:52    分类:技术分享    informix   4gl

Type Conversion in Informix 4GL

I want to convert a variable of type VARCHAR to INTEGER and vice versa (i.e. from INTEGER type to VARCHAR) in Informix 4GL.

2021-09-04 06:44:34    分类:问答    informix   4gl

How to convert A00073 value to 9973 in progress 4gl

i have column having multiple value like A0045 ,A00065 . i want to convert it 9945, 9965. Need to remove all 0 and character value and add 99 before that value.. Please help..

2021-05-14 12:01:03    分类:问答    openedge   progress-4gl   4gl