fix(M02-흐름도): 함수 판 시트 · 식 보기가 선 규칙을 지나 들어온 값(arrived)을 받은 칸에 넣어 보임 - Paper · Entry 가 값 · 다른 로직을 넘김 · 오류 글은 값 없음

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D2nUMUMTsqm93PbQtipo6c
This commit is contained in:
2026-10-02 01:44:34 +09:00
co-authored by Claude Sonnet 5.5
parent 453ac49dd8
commit 9269e9da97
6 changed files with 146 additions and 61 deletions
@@ -39,6 +39,7 @@ const TEXT = {
Else: ["아니면", "Otherwise"],
If: ["만약", "If"],
Now: ["지금", "now"],
NoValue: ["값 없음", "no value"],
} as const;
const tv = (key: keyof typeof TEXT): string => TEXT[key][currentLanguageIndex === 1 ? 1 : 0];
@@ -95,7 +96,12 @@ function pretty(text: string): string {
const fmt = (n: number): string =>
Number(n.toPrecision(12)).toLocaleString("ko-KR", { maximumFractionDigits: 6 });
/** 오류 글(#N/A …)은 값이 없다는 뜻 — 따옴표째 보이지 않음 */
const isError = (v: CellScalar | undefined): boolean =>
typeof v === "string" && /^#[A-Z/0!?]+$/.test(v);
function showScalar(v: CellScalar | undefined): string {
if (isError(v)) return tv("NoValue");
if (v === undefined || v === null) return "0";
if (typeof v === "number") return fmt(v);
if (typeof v === "boolean") return v ? "TRUE" : "FALSE";