<i id='nrz2i'><div id='nrz2i'><ins id='nrz2i'></ins></div></i>
  • <tr id='nrz2i'><strong id='nrz2i'></strong><small id='nrz2i'></small><button id='nrz2i'></button><li id='nrz2i'><noscript id='nrz2i'><big id='nrz2i'></big><dt id='nrz2i'></dt></noscript></li></tr><ol id='nrz2i'><table id='nrz2i'><blockquote id='nrz2i'><tbody id='nrz2i'></tbody></blockquote></table></ol><u id='nrz2i'></u><kbd id='nrz2i'><kbd id='nrz2i'></kbd></kbd>
  • <i id='nrz2i'></i>
    <acronym id='nrz2i'><em id='nrz2i'></em><td id='nrz2i'><div id='nrz2i'></div></td></acronym><address id='nrz2i'><big id='nrz2i'><big id='nrz2i'></big><legend id='nrz2i'></legend></big></address>

    <dl id='nrz2i'></dl>

      1. <fieldset id='nrz2i'></fieldset>

        1. <ins id='nrz2i'></ins>

            <code id='nrz2i'><strong id='nrz2i'></strong></code>

            <span id='nrz2i'></span>

            pascal+sublime搭建Pascal学习环境

            • 时间:
            • 浏览:13
            • 来源:124软件资讯网

            一、fpc安装

            1. 下载:http://www.freepascal.org/down/i386/win32.var(或者:http://download.csdn.net/detail/wenph4008/8916963)

            2. 安装:双击安装

            3. 写一个测试代码:pascal_test.pas在桌面

            4. 测试编译:乐成  !

            5. 运行:乐成  !

            6. 加情况变量

            右键我的电脑”->属性”->高级系统设置”->情况变量”->双击系统变量”里的Path”->把fpc.exe的路径复制进去 ,记得用分号离隔  。

            7. 继续测试编译运行:乐成 !

            二、sublime2安装

            1. 下载:http://www.sublimetext.com/2(或者:http://download.csdn.net/detail/wenph4008/8916969)

            2. 安装:双击安装

            3. 修改tab为4个空格:Preferences->setting-default->

             

            {
                "tab_size": 4,
                "translate_tabs_to_spaces":true
            }

             

            4. pascal语法高亮:

            (1)下载语法高亮代码:https://packagecontrol.io/packages/Pascal(或者:http://download.csdn.net/detail/wenph4008/8916973)

            (2)打开保证理地址:Preferences -> Browse Packages…

            (3)新建一个文件夹:Installed Packages

            (4)把适才下载的解压到这个文件夹

            (5)view->syntax选择Pascal即可

            5. 集成编译运行

            (1)新建一个build情况:Tool->Build System->New BuildSystem...

            (2)把以下内容粘贴进去

            I.编译和运行离开

             

            {
                "cmd":["fpc", "${file}","-o${file_path}/${file_base_name}.exe"],
                "file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:?(.*)$",
                "working_dir":"${file_path}",
                "selector":"source.pascal",
                "variants":
                [
                    {
                        "cmd":["start", "cmd", "/c", "$file_base_name.exe& pause"],
                        "shell": true,
                        "name":"Run"
                    }
                ]
            }

             

            II.编译和运行在一起

             

            {
                "cmd":["fpc", "${file}","-o${file_path}/${file_base_name}.exe"],
                "file_regex":"^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
                "working_dir":"${file_path}",
                "selector":"source.pascal",
                "variants":
                [
                    {
                        "name":"Run",
                        "cmd":["cmd", "/c","fpc","${file}","-o${file_path}/${file_base_name}.exe","&&","${file_path}/${file_base_name}.exe"],
                        "shell": true
                    }
                ]
            }

             

            (3)生存为my_pascal_build_run.sublime-build  ,而且放在C:Userspinghua.wphAppDataRoamingSublime Text2PackagesUser目录下  。

            6. 注册

            Help里注册:

             

            ----- BEGIN LICENSE -----
            Andrew Weber
            Single User License
            EA7E-855605
            813A03DD 5E4AD9E6 6C0EEB94 BC99798F
            942194A6 02396E98 E62C9979 4BB979FE
            91424C9D A45400BF F6747D88 2FB88078
            90F5CC94 1CDC92DC 8457107A F151657B
            1D22E383 A997F016 42397640 33F41CFC
            E1D0AE85 A0BBD039 0E9C8D55 E1B89D5D
            5CDB7036 E56DE1C0 EFCC0840 650CD3A6
            B98FC99C 8FAC73EE D2B95564 DF450523
            ------ END LICENSE ------