Forum > Russian
Лазарус на MacOS
Ivan291368:
hello everyone why can't I run THE SIMPLEST program? using an online compiler is running but HERE ( https://radikal.ru/video/XaRxCW7F56N) NO
how fix ?
dbannon:
Sorry Ivan, you will need to give us a lot more information about what you are doing.
By "run the simplest program" do you mean compile and run a Lazarus or FPC program on your Mac ? Or are you downloading a program from somewhere and trying to run it ?
Assuming FPC and or Lazarus, have you installed either of both FPC, Lazarus ?
Do they start up and work as expected ?
If they work, then maybe the source code of your simplest program is the problem, post it here !
Davo
trev:
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---Program seconds; uses crt; var rez : longint; begin clrscr; rez := 60; writeLn('Seconds in a day: ', rez*24*60); writeLn('Seconds in a week: ', rez*24*60*7); writeLn('Seconds in a year: ', rez*24*60*365);end.
Compile on the command line with: fpc program.pas
Run the program on the command line with: ./program
--- Code: Text [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---Seconds in a day: 86400Seconds in a week: 604800Seconds in a year: 31536000
If you want to do this in the Lazarus IDE, then you need to select the correct type of project. It looks like you selected "Application" which is for a GUI program because you have a TForm called Form1. You needed to instead select "Simple Program" which looks like my attachment and compiles and runs without error :)
wp:
If you can live without a cleared screen, you could also skip the "uses crt" and "ClearScr".
Ivan291368:
Oh, guys, I don't understand. I open in the usual way (in that video I opened via the macOS terminal) and it seems that all settings are reset
in short, what me need edit here ( https://radikal.ru/video/1VERHMKoWyh) ?
Or tell me what need to do so that the result of executing this code can be displayed on the screen
Navigation
[0] Message Index
[#] Next page