//+------------------------------------------------------------------+ //| Test.mq5 | //| Copyright 2026, Niquel Mendoza | //| https://www.mql5.com | //+------------------------------------------------------------------+ #property copyright "Copyright 2026, Niquel Mendoza" #property link "https://www.mql5.com" #property version "1.00" #property strict //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ #include "Iteradores.mqh" //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ #resource "SHA3_512ShortMsg.rsp" as const string g_raw //+------------------------------------------------------------------+ //| Script program start function | //+------------------------------------------------------------------+ void OnStart() { //--- TSN::CRSPParser rsp; //--- rsp.Assing(g_raw); rsp.CorrectPadding(); rsp.Parse(); TSN::CRSPNode node = rsp.GetRoot(); //-- general rsp.PrintCintaTypes(0, 10); Print(node.RootSize()); TSN::CRSPNode lv = node["L"].Value(); PrintFormat("L value = %s | L Is cor meta = %s ", lv.ToString(), (node["L"].MetaIsCor() ? "true" : "false")); Print(node["MD"].Value().ToString()); //--- node.MoveNextPositionsThis(3); // siguiente triplete //--- const string keys[3] = {"Len", "Msg", "MD"}; Print("--------- iteration ---------"); CRSPIteratorHashFast(3) it = node.MakeHashIterator(keys); while(it.IsValid() && it.ReadPars() < 10) { Print("Len:\n", it["Len"].Value().ToString()); Print("Msg:\n", it["Msg"].Value().ToString()); Print("MD:\n", it["MD"].Value().ToString()); it.Next(); } } //+------------------------------------------------------------------+