Skip to content

PECF WIKI PAGE (version 1.0.26)

Zedikon edited this page Feb 11, 2022 · 5 revisions

PECF DOCS

Structure of PECF string:

the structure of the pecf string consists of the variable name, its value and tags of the data type of your variable. Let's look at the example below:

hehe:not hehe

PECF string parsing:

To parse a string in PECF, you need to first load a variable with this string into PECF and then decode it. To do this, there are two functions in PECF: load (takes one argument, the name of the variable in which the string is located) and decode (the variable whose value you need to get) See usage examples below

exampe = "hehe:not hehe"

pecf.load(example)

print(pecf.decode("hehe"))

// result: not hehe

Tags:

do: will execute a python script or perform an operation with numbers (in other words, the equivalent of eval Therefore, I do not advise using it in public projects to avoid security threats.)

int: integer

str: string

float: floating point number

hex: if the value is in decimal, it is converted to hexadecimal if in hexadecimal, it is converted to decimal

you can say PECF what type of data does this variable carry. At the moment, only two tags are available: float, hex, do, integer and string. To specify type of your variable PECF, put the label "str:" or "int:" or "do:" or "hex:" or "float:" before the value of the variable, which respectively means string, do or integer. If you do not specify a label, PECF will give your variable the type string by default.

see example using tags below.

Int tag:

example = "five: int: 5" print(example + 5)

// result: 10

Str tag:

example = "hehe: str: nothehe"

pecf.load(example)

print(pecf.decode(""))

// result: not hehe

Do tag:

example = "ded: do: 1000-7"

pecf.load(example)

print(pecf.decode("ded"))

// result: 993

Float tag:

example = "Float: float: 54"

pecf.load(example)

pecf.decode("Float")

// result: 54.0

Hex tag:

example = "Hex_code: hex: 10 Hex_decode: hex: 0xa"

pecf.load(example)

a = pecf.decode("Hex_code") + "" + "pecf.decode("hex_decode")

print a

// result: 0xa 10

pecf.load

WARNING

PECF now not supported more then one meaning of variable, but it will be fixed in next updates.

Clone this wiki locally