Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

ring define private attributes and methods

o1 = new person {
        name = "Test"
        age = 20
        print()
        o1.printsalary()
}

try
        see o1.salary
catch
        see cCatchError + nl
done

try
        o1.increasesalary(1000)
catch
        see cCatchError + nl
done

Class Person

        name age

        func print
                see "Name   : " + name + nl +
                    "Age    : " + age + nl

        func printsalary
                see "Salary : " + salary + nl

        private

        salary = 15000

        func increasesalary x
                salary += x
Comment

PREVIOUS NEXT
Code Example
Python :: print all gpu available tensor 
Python :: plt datas use left and right yaxes 
Python :: easy ocr python pypi 
Python :: ring get a list of functions names written in the Ring language 
Python :: nnumpy matrix count non negative values 
Python :: pandas rolling list 
Python :: how to insert a character into a string in python 
Python :: how to get only the string of the input not the spaces arournd it in python 
Python :: view scrapy response in chrome from inside the spider 
Python :: sumy library 
Python :: matplotlib doesnt show suptitle 
Python :: df.write using another delimiter 
Python :: Find the 15th term of the series?0,0,7,6,14,12,21,18, 28 
Python :: custom 3d image generator for segmentation 
Python :: alternatives for appending to numpy array 
Python :: how to make download link in Jupyter appmode 
Python :: creating a news app using djangio 
Python :: cant import flask mail 
Python :: python post np.array object 
Python :: max path limit python 
Python :: pandas dataframe to dictionary with duplicate index 
Python :: rename column in dataframe 
Python :: any(iterable) 
Python :: demploy django in vps 
Python :: python ravel function output 
Python :: Start Django Project At http://127.0.0.1:8080/ 
Python :: convert to string except missing 
Python :: Creating a Tuple with Mixed Datatypes. 
Python :: Python Tkinter RadioButton Widget Syntax 
Python :: how to track exact location of a phone number in python 
ADD CONTENT
Topic
Content
Source link
Name
6+3 =