Proposal: v0.1
timed out 5-0 enacted by card
as a note the last part of the proposal didn’t do anything because the text wasn’t there to be replaced.
Adminned at 30 Sep 2018 18:00:19 UTC
// MASTER CONTROL PROGRAM
GNDT = `__GNDT`
MCPOutput = ""
if (GNDT == "__" + "GNDT") {
printLine("Illegal execution? A GNDT dump must be provided.");
} else {
GNDTLines = GNDT.split("\n")
GNDTLines.forEach(function(entry) {
GNDTFields = entry.split("\t")
programName = GNDTFields[0]
programInput = GNDTFields[1]
programOutput = GNDTFields[2]
if (programName == "card") {
return 0
}
inputRegister = programInput.charCodeAt(0) + programInput.charCodeAt(1)
outputRegister = programOutput.charCodeAt(0) + programOutput.charCodeAt(1)
if (inputRegister < outputRegister) {
printLine(programName + " check OK")
} else {
printLine(programName + " register disparity")
}
});
}
function printLine(message) {
MCPOutput += "[" + message + "]<"+"br"+">"
}
Replace "__GNDT is replaced by a single backquote (`) surrounding a GNDT dump" with "__GNDT is replaced by a GNDT dump".
Alright, let’s try a basic GNDT-reading MCP to see if anything breaks. This reads in the GNDT data and confirms some meaningless calculations; it has no effect (and there’s no mechanism to actually Execute the MCP yet anyway).
Kevan: he/him
Okay, for reference: the only way I could get that to work was to select “Auto br” on the Formatting dropdown when writing the post (so that ExpressionEngine didn’t prettify all the quotemarks, but did put a carriage return after each line), and I had to break the br tag at the very end into chunks to stop ExpressionEngine from interpreting it as an actual br tag.
Apart from that this wasn’t too painful.