// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Transpose a small rectangular table // Not compiled or tested in-world // Setup: Edit CELLS and COLUMNS; touch as owner. // Stop / restore: Remove or disable. This example only calculates and reports to the owner. // Notes: Requires complete rows and caps the sample at 100 cells. It prints each transposed row; no spreadsheet or external file is changed. // License: see LICENSE in this distribution. // Original Incoprea example. MIT. list CELLS=["Name","Color","Lamp","Green","Cup","Blue"]; integer COLUMNS=2; default { touch_start(integer count) { if(llDetectedKey(0)!=llGetOwner()) return; integer total=llGetListLength(CELLS); if(COLUMNS<1 || total%COLUMNS!=0 || total>100) { llOwnerSay("Invalid table dimensions."); return; } integer rows=total/COLUMNS; integer col; integer row; for(col=0;col