rpg_source.zig: a date or time field takes its external format from its descriptors, not from its start value #756
Loading…
Reference in a new issue
No description provided.
Delete branch "lr3c"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
d = %date()into adate(*jis),*mdy,*dmy,*ymdor*julfield was emitted as%CHAR(%DATE())into achar(8)(char(6)for*jul) field, adate(*jis)field asdate, atime(*eur)field astimeand atime(*jis)field astime(*hms): silent wrong text that compiles to another object. The start value cannot name these formats (*JISstarts as*ISOdoes,*EURtime as*ISOtime,*MDYand*DMYalike), but the call of the date run time that follows builds a 16-byte descriptor for the field.rpg_date_fields.zigreads the descriptor of each static field in a call of_QRNX_DT_CVT,_QRNX_DT_INC,_QRNX_DT_DECor_QRNX_DT_SUB: the address stored at the descriptor and the literal stored beside it, in the order the call passes them. A field named with two formats is left out; the source of%DATE(c: fmt)(characters) is not a field of that format.date(*jis),time(*eur)and so on, and the start value that is the default of its format is not an INZ clause (*MDYand*DMY01/01/40,*YMD40/01/01,*JUL40/001).rpg_date_add.zigis gone).new_typed): when the start value of the field has no rule in its format, the field keeps the declaration of the program without the descriptors. A start value in the format of the field is a date or time literal in the *ISO form (date(*mdy)'10/22/26'isd'2026-10-22', two-digit years 1940 to 2039,date(*jul)'26/295',time(*usa)'08:00 AM'ist'08.00.00'); the declaration names the format that the descriptors proved, andtimeLiteralanddateInitialtake it as the format of the value.s7f-typesands7f-types-dfltnow declare the SQL host variablesd1,t1ands1asdate,timeandtimestamp(the source declares them so; they were not declared).lr3-date-jis-add,lr3-date-mdy-add,lr3-date-dmy-add,lr3-date-ymd-add,lr3-date-jul-add,lr3-time-eur-add,lr3-time-jis-add(dictionary captures; red tests insrc/rpg_lr3c_test.zig).A_00253_F10 = %DATE()intochar(10)is not the program (probeslr3x-ds-step-first,lr3x-ds-ts-first;lr3x-date-char-in-dsis the control that a data structure with a date subfield stays a failure).ds.ais a date, a time or a timestamp). The refusal above stands in for it; the declaration of such a data structure as onechar(N)with a start value (lr3x-date-char-in-ds) is the same family.