Skip to content

Commit 7d986b0

Browse files
committedJan 2, 2020
Sync
1 parent ce2b30b commit 7d986b0

File tree

8 files changed

+56
-66
lines changed

8 files changed

+56
-66
lines changed
 

‎easycoder/plugins/browser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1111,7 +1111,7 @@ const EasyCoder_Browser = {
11111111
eventTarget.targetRecord.index = eventTarget.targetIndex;
11121112
setTimeout(function () {
11131113
EasyCoder.timestamp = Date.now();
1114-
let p = EasyCoder.scripts[eventTarget.targetRecord.program];
1114+
let p = EasyCoder.scripts[eventTarget.targetRecord.program]
11151115
p.run(eventTarget.targetPc);
11161116
}, 1);
11171117
}

‎easycoder/plugins/json.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ const EasyCoder_Json = {
467467
return {
468468
type: `constant`,
469469
numeric: true,
470-
content: array ? array.length : 0
470+
content: array.length
471471
};
472472
case `keys`:
473473
symbolRecord = program.getSymbolRecord(value.name);

‎easycoder/plugins/rest.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ const EasyCoder_Rest = {
140140
if (command.onError) {
141141
program.errorMessage = `Exception trapped: ${error}`;
142142
program.run(command.onError);
143-
program.run(command.pc + 1);
144143
} else {
145144
program.runtimeError(command.lino, `Error: ${error}`);
146145
}

‎js/plugins/json.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ const EasyCoder_Json = {
467467
return {
468468
type: `constant`,
469469
numeric: true,
470-
content: array ? array.length : 0
470+
content: array.length
471471
};
472472
case `keys`:
473473
symbolRecord = program.getSymbolRecord(value.name);

‎resources/ecs/codex.ecs

Lines changed: 53 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
a Link
4242
a Index
4343
module TestModule
44-
module DocManModule
4544
callback DecoratorCallback
4645
variable Password
4746
variable PasswordRequested
@@ -89,6 +88,7 @@
8988
variable FileIsOpen
9089
variable Item
9190
variable Items
91+
debug step
9292

9393
load showdown
9494
rest get ECPayload from `/resources/fragment/ec.txt`
@@ -113,7 +113,7 @@
113113
load plugin `gmap`
114114
load plugin `svg`
115115

116-
codemirror init basic profile `https://` cat the hostname cat `/easycoder/plugins/codemirror-ecs.js`
116+
codemirror init basic profile `https://`cat the hostname cat `/easycoder/plugins/codemirror-ecs.js`
117117
require css `https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.46.0/addon/dialog/dialog.css`
118118
require js `https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.46.0/addon/dialog/dialog.js`
119119
require js `https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.46.0/addon/search/search.js`
@@ -139,7 +139,7 @@
139139

140140
create Screen in Body
141141
create Container in Screen
142-
set the style of Container to `width:100%;height:100%;display:flex;flex-direction: column`
142+
set the style of Container to `width:100%;height:100%;display:flex;flex-direction: column`
143143

144144
create Controls in Container
145145
set the style of Controls to `flex:5em`
@@ -271,59 +271,58 @@
271271
create HelpInner in HelpOuter
272272
set the style of HelpInner to `width:100%;line-height:1.5em`
273273

274-
create HelpPanel in HelpInner
275-
set the style of HelpPanel to `display:none;width:100%;height:100%`
276-
create ReferencePanel in HelpInner
277-
set the style of ReferencePanel to `display:none;width:100%;height:100%`
274+
create HelpPanel in HelpInner
275+
set the style of HelpPanel to `display:none;width:100%;height:100%`
276+
create ReferencePanel in HelpInner
277+
set the style of ReferencePanel to `display:none;width:100%;height:100%`
278278

279-
gosub to ShowHelpPage
280-
rest get Script from `/resources/ecs/docman.ecs`
281-
run Script with ReferencePanel as DocManModule
282-
put empty into storage as `.ref`
279+
gosub to ShowHelpPage
280+
rest get Script from `/resources/ecs/docman.ecs`
281+
run Script with ReferencePanel
282+
put empty into storage as `.ref`
283283

284-
get Item from storage as `.ref`
285-
if Item
286-
begin
287-
set style `display` of ReferencePanel to `block`
288-
set style `display` of HelpButtons to `none`
289-
end
290-
else set style `display` of HelpPanel to `block`
291-
292-
on click Back go to StepBack
293-
on click Forward go to StepForward
294-
on click Contents go to ShowContents
295-
on click Reference
296-
begin
297-
set style `display` of ReferencePanel to `block`
298-
set style `display` of HelpPanel to `none`
299-
set style `display` of HelpButtons to `none`
300-
put `y` into storage as `.ref`
301-
end
302-
on click Tools
303-
begin
304-
put `tools` into Step
305-
gosub to ShowHelpPage
306-
end
307-
on click Exit
308-
begin
309-
stop DocManModule
310-
remove element Body
311-
send `restore` to parent
312-
exit
313-
end
314-
315-
on message
316-
begin
317-
put the message into Message
318-
if Message is `next` go to StepForward
319-
if Message is `tutorial`
320-
begin
321-
set style `display` of ReferencePanel to `none`
322-
set style `display` of HelpPanel to `block`
323-
set style `display` of HelpButtons to `block`
324-
put empty into storage as `.ref`
325-
end
326-
end
284+
get Item from storage as `.ref`
285+
if Item
286+
begin
287+
set style `display` of ReferencePanel to `block`
288+
set style `display` of HelpButtons to `none`
289+
end
290+
else set style `display` of HelpPanel to `block`
291+
292+
on click Back go to StepBack
293+
on click Forward go to StepForward
294+
on click Contents go to ShowContents
295+
on click Reference
296+
begin
297+
set style `display` of ReferencePanel to `block`
298+
set style `display` of HelpPanel to `none`
299+
set style `display` of HelpButtons to `none`
300+
put `y` into storage as `.ref`
301+
end
302+
on click Tools
303+
begin
304+
put `tools` into Step
305+
gosub to ShowHelpPage
306+
end
307+
on click Exit
308+
begin
309+
remove element Body
310+
send `restore` to parent
311+
exit
312+
end
313+
314+
on message
315+
begin
316+
put the message into Message
317+
if Message is `next` go to StepForward
318+
if Message is `tutorial`
319+
begin
320+
set style `display` of ReferencePanel to `none`
321+
set style `display` of HelpPanel to `block`
322+
set style `display` of HelpButtons to `block`
323+
put empty into storage as `.ref`
324+
end
325+
end
327326

328327
on error
329328
begin

‎resources/ecs/docman.ecs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@
123123
end
124124
json sort Packages
125125
set ready
126-
on message exit
127126

128127
Restart:
129128
clear Container

‎resources/ecs/showdown.ecs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
rest get ECPayload from `/resources/fragment/ec.txt`
1414
rest get Codex from `/resources/fragment/codex.txt`
1515

16-
load showdown
1716
on DecoratorCallback go to Decorate
1817
on message
1918
begin

‎resources/md/about.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# About EasyCoder #
2-
32
Most websites are quite easy to describe in English, yet programmers write their code in JavaScript, which looks nothing like English and which for anyone other than an expert is very hard to follow. So we created ~ec~, a language that looks a lot like English and lets you code much the same way you describe your site. It's a productivity tool you can use to build parts of websites or even entire websites.
43

54
For example, suppose you want to react to the user clicking a screen element by turning the background of that element pink. This is an action requiring a small piece of CSS that sets the 'background' style of the element to 'pink'. In ~ec~ it's just that:
@@ -13,7 +12,6 @@ By contrast, the 'script' containing ~ec~ commands goes into a special element i
1312
If you'd like to know more we recommend you start with our /CODEX/, a combined tutorial, prorammer's playground and reference manual. Or you can browse the site links /SIDEBAR/.
1413

1514
## Features ##
16-
1715
The main features of ~ec~ are as follows:
1816

1917
~ec~ looks like English; not conversational English, admittedly, but the sort of English we use when giving directions or following a recipe. A formalized version of English, that doesn't use the symbols usually found in conventional programming languages, which cause ordinary people such grief when trying to match brackets or figure what a triple-equals is for.
@@ -31,7 +29,3 @@ Coding services
3129

3230
---
3331
**Note:** This static website is designed to provide a legacy alternative to the main ~ec~ site ([https://easycoder.software](https://easycoder.software)) in the event of the latter not being available or becoming unsupported.
34-
35-
### The Author ###
36-
37-
My name is Graham Trott. I've been writing easy-to-use high-level programming languages for over 30 years and using them to solve real-world problems and needs. Since (at the time of writing) I'm now in my 70s this will probably be the last one in the line, hence the need to document everything as well as possible. This website - [(https://easycoder.github.io](https://easycoder.github.io) - is hosted by GitHub and will probably outlive me by a comfortable margin, so you can't rely on being able to contact me for help. The site is attached to the [EasyCoder](https://github.com/easycoder) repository, where you will find all the source code.

0 commit comments

Comments
 (0)
Please sign in to comment.