I have a C++ project and want to describe the variables and functions in the code.
A small example is shown below. I am wondering where to best describe the variables and functions. I have made a UML diagram in the beginning.
There are several options
1. In the UML diagram in the beginning.
2. Just after showing the UML diagram.
3. In the declaration of the variables and functions.
4. In the implementation for functions
Any suggestions please, as I'd like a coherent way of doing this, which will help the programmer use the class in the easiest way possible.
updateEnvironmentField() {
linewithoutquotes=`echo $LINE | tr -d '"'`
b()
}
I want to pass variable named $linewithoutquotes to another method called b(), which is called from updateEnvironmentField() method. How to do the above requirement with shell script (1 Reply)
Hello All,
I would like to ask help from you on how to pass variable value from a function that has been called inside the function. I have created below and
put the variables in " ". Is there another way I can do this? Thank you in advance.
readtasklist() {
while read -r mod ver... (1 Reply)
I ran into a slight problem with vi jumping to a variable definition and not function when both have the same name.
Does anybody know if I can influence ctags to give preference to function over the variable?
Details of my setup:
in $MYLIB/myedi.h I have a struct with short procname in... (1 Reply)
hi all
this is my function
#! /bin/sh
awk '/ Type/ { print "m;" $4 } /IDf/ {print $3 } /IuSac/ { print $3 } /IuSac/ { print $1 }' / IBM.txt |tr '\n' ';'| perl -pi -e 's/;m//g'|cut -d ";" -f 2-5 ' >> 2m
1) i wanna make it to save output of awk in a file named by date in order not to... (3 Replies)
Hello again :)
Am currently trying to write a function which will delete a record from a file.
The code currently looks as such:
function deleteRecord() {
clear
read -p "Please enter the ID of the record you wish to remove: " strID
... (2 Replies)
Hi Forum
Can anyone tell me whats wrong with my script. What i want to do read in values from a input file using a while loop then taking that input from the file into a function that i created. Every time i execute the script it goes through the while loop but the function doesn't see the... (10 Replies)
Hi All,
As per my understanding, value of variable is retained outside function.
But the value of array myarrayDriver is not retained outside function. Could you please tell the reason for the same..
code:
readingConfigFile()
{
search_keyword="$1"
i=0
for pointer in $(cat... (7 Replies)
Hey folks,
I'm pretty new to unix programming. I was trying to get something to work but it's not doing what I expected.
#!/bin/ksh
. ./functions.sh
STRING=function_1
FUNCTION="$STRING"
RETURN=eval $FUNCTION
echo "value of $FUNCTION function is: $RETURN"
All i'm... (5 Replies)
Hi ,
I have three funcions f1, f2 and f3 .
f1 calls f2 and f2 calls f3 .
I have a global variable "period" which i want to pass to f3 .
Can i pass the variable directly in the definition of f3 ?
Pls help .
sars (4 Replies)
I would like to know how to pass a variable inside a variable to a function.
sample code below
--------------
for x in 1 9
do
check_null $C$x ##call function to check if the value is null
if
then
echo "line number:$var_cnt,... (2 Replies)