File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -234,6 +234,16 @@ function Script_IntToHex(Sender:TObject; var A:TVarList; var R:TVar) : boolean;
234234 Result := true;
235235end ;
236236
237+ { Script CHR(byte): char;
238+ Аналог CHR}
239+ function Script_CHR (Sender:TObject; var A:TVarList; var R:TVar) : boolean;
240+ begin
241+ if A.Count < 1 then Exit(false);
242+
243+ R.Value := CHR(TPVar(A.Items[0 ])^.Value );
244+ Result := true;
245+ end ;
246+
237247{ Script SPIEnterProgMode(speed): boolean;
238248 Инициализирует состояние пинов для SPI и устанавливает частоту SPI
239249 Если частота не установлена возвращает false
@@ -641,6 +651,7 @@ procedure SetScriptFunctions(PC : TPasCalc);
641651 PC.SetFunction(' LogPrint' , @Script_LogPrint);
642652 PC.SetFunction(' ProgressBar' , @Script_ProgressBar);
643653 PC.SetFunction(' IntToHex' , @Script_IntToHex);
654+ PC.SetFunction(' CHR' , @Script_CHR);
644655
645656 PC.SetFunction(' ReadToEditor' , @Script_ReadToEditor);
646657 PC.SetFunction(' WriteFromEditor' , @Script_WriteFromEditor);
You can’t perform that action at this time.
0 commit comments