GithubHelp home page GithubHelp logo

marcianobarros20 / 4d-macro-string-to-text Goto Github PK

View Code? Open in Web Editor NEW

This project forked from miyako/4d-macro-string-to-text

0.0 2.0 0.0 25 KB

Replace deprecated variable/array declarations in legacy 4D code.

4d-macro-string-to-text's Introduction

4d-macro-string-to-text

Replace deprecated variable/array declarations in legacy 4D code.

###As a function

$code:=macro_replace_deprecated_types (Current method path)
  • Example
C_POINTER($pointerB;$pointerA)
C_TEXT($textC)
C_BLOB($blobE)
C_TEXT($textD)
C_BLOB($blobF)
C_BOOLEAN($booleanH;$booleanG)
C_DATE($dateJ)
EXECUTE FORMULA("C_BOOLEAN($booleanW)")
C_DATE($dateI)
C_TIME($timeK)
C_TIME($timeL)
C_REAL($realM)
C_PICTURE($pictureQ)
C_LONGINT($longintO;$longintP)
C_REAL($realN)
C_PICTURE($pictureR)
_o_C_INTEGER($integerS)
C_GRAPH($graphT)
_o_C_STRING(10;$stringU)
_o_C_STRING(11;$stringV;$stringW)

$code:=macro_replace_deprecated_types (Current method path)

SET TEXT TO PASTEBOARD($code)
  • Result
//%attributes = {"lang":"en"} comment added and reserved by 4D.
C_POINTER($pointerB;$pointerA)
C_TEXT($textC)
C_BLOB($blobE)
C_TEXT($textD)
C_BLOB($blobF)
C_BOOLEAN($booleanH;$booleanG)
C_DATE($dateJ)
EXECUTE FORMULA("C_BOOLEAN($booleanW)")
C_DATE($dateI)
C_TIME($timeK)
C_TIME($timeL)
C_REAL($realM)
C_PICTURE($pictureQ)
C_LONGINT($longintO;$longintP)
C_REAL($realN)
C_PICTURE($pictureR)
C_LONGINT($integerS)//_o_C_INTEGER
C_GRAPH($graphT)
C_TEXT($stringU)//_o_C_STRING(10)
C_TEXT($stringV;$stringW)//_o_C_STRING(11)

$code:=macro_replace_deprecated_types (Current method path)

SET TEXT TO PASTEBOARD($code)
  • Global Replace (not recommneded!)
METHOD GET PATHS(Path all objects;$paths)

For ($i;1;Size of array($paths))

$path:=$paths{$i}

If ($path#Current method path)
METHOD SET CODE($path;macro_replace_deprecated_types ($path))
End if 

End for 

###As a macro

  • Before

before

  • After

after

  • The macro

macro-menu

4d-macro-string-to-text's People

Contributors

miyako avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.